"use strict";(self.webpackChunkkeybase=self.webpackChunkkeybase||[]).push([[9641],{39641(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(22024),_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(24953),_constants_chat2__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(3696),_common_adapters__WEBPACK_IMPORTED_MODULE_4__=(__webpack_require__(67926),__webpack_require__(63044)),_constants_fs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(17197),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(20390);const __WEBPACK_DEFAULT_EXPORT__=props=>{const $=(0,react_compiler_runtime__WEBPACK_IMPORTED_MODULE_0__.c)(16),{ordinal}=props;let t0;$[0]!==ordinal?(t0=s=>s.messageMap.get(ordinal),$[0]=ordinal,$[1]=t0):t0=$[1];const message=_constants_chat2__WEBPACK_IMPORTED_MODULE_2__.useChatContext(t0),title=message?.title||message?.fileName||"PDF",url=message?.fileURL,openLocalPathInSystemFileManagerDesktop=(0,_constants_fs__WEBPACK_IMPORTED_MODULE_5__.useFSState)(_temp),attachmentDownload=_constants_chat2__WEBPACK_IMPORTED_MODULE_2__.useChatContext(_temp2);let t1;$[2]!==attachmentDownload||$[3]!==message||$[4]!==openLocalPathInSystemFileManagerDesktop?(t1=()=>{message&&attachmentDownload(message.ordinal),openLocalPathInSystemFileManagerDesktop?.(_constants__WEBPACK_IMPORTED_MODULE_1__.LP)},$[2]=attachmentDownload,$[3]=message,$[4]=openLocalPathInSystemFileManagerDesktop,$[5]=t1):t1=$[5];const onDownload=t1;let t2,t3,t4,t5;return $[6]!==title?(t2={title:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_4__.Text,{type:"BodyBig",children:title})},$[6]=title,$[7]=t2):t2=$[7],$[8]!==onDownload?(t3={content:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_4__.ButtonBar,{small:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_4__.Button,{type:"Default",label:"Download",onClick:onDownload})})},$[8]=onDownload,$[9]=t3):t3=$[9],$[10]!==url?(t4=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_4__.Box2,{direction:"vertical",fullWidth:!0,fullHeight:!0,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("embed",{src:url,width:"100%",height:"100%"})}),$[10]=url,$[11]=t4):t4=$[11],$[12]!==t2||$[13]!==t3||$[14]!==t4?(t5=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_common_adapters__WEBPACK_IMPORTED_MODULE_4__.Modal2,{header:t2,footer:t3,children:t4}),$[12]=t2,$[13]=t3,$[14]=t4,$[15]=t5):t5=$[15],t5};function _temp(s_0){return s_0.dispatch.dynamic.openLocalPathInSystemFileManagerDesktop}function _temp2(s_1){return s_1.dispatch.attachmentDownload}}}]);
//# sourceMappingURL=9641.bundle.js.map