"use strict";(self.webpackChunkkeybase=self.webpackChunkkeybase||[]).push([[4954],{34954(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>delete_history_warning});var compiler_runtime=__webpack_require__(22024),index_desktop=__webpack_require__(63044),constants=__webpack_require__(24953),chat2=__webpack_require__(3696),box_desktop=__webpack_require__(62899),popup_dialog_desktop=__webpack_require__(29577),styles_index_desktop=__webpack_require__(88874),jsx_runtime=__webpack_require__(20390);const MaybePopup=styles_index_desktop.isMobile?props=>(0,jsx_runtime.jsx)(box_desktop.Ay,{style:{height:"100%",width:"100%"},children:props.children}):props=>(0,jsx_runtime.jsx)(popup_dialog_desktop.A,{onClose:props.onClose,onMouseUp:props.onMouseUp,onMouseDown:props.onMouseDown,onMouseMove:props.onMouseMove,styleCover:styles_index_desktop.collapseStyles([props.cover&&_styleCover,props.styleCover]),styleContainer:props.cover?{..._styleContainer,...props.styleContainer}:{},styleClipContainer:props.styleClipContainer,children:props.children}),_styleCover={alignItems:"stretch",backgroundColor:styles_index_desktop.globalColors.black},_styleContainer={height:"100%"},maybe_popup=MaybePopup,styles=index_desktop.Styles.styleSheetCreate(()=>({box:index_desktop.Styles.platformStyles({common:{alignItems:"center",backgroundColor:index_desktop.Styles.globalColors.white,justifyContent:"center",padding:index_desktop.Styles.globalMargins.small},isMobile:{width:"100%"}}),button:index_desktop.Styles.platformStyles({isElectron:{marginLeft:index_desktop.Styles.globalMargins.tiny},isMobile:{marginTop:index_desktop.Styles.globalMargins.tiny}}),buttonBox:index_desktop.Styles.platformStyles({common:{marginTop:index_desktop.Styles.globalMargins.xlarge},isElectron:{...index_desktop.Styles.globalStyles.flexBoxRow},isMobile:{...index_desktop.Styles.globalStyles.flexBoxColumn,alignItems:"stretch",flex:1,flexDirection:"column-reverse",paddingTop:index_desktop.Styles.globalMargins.xlarge,width:"100%"}}),padding:index_desktop.Styles.platformStyles({isElectron:{marginBottom:40,marginLeft:80,marginRight:80,marginTop:40},isMobile:{paddingTop:index_desktop.Styles.globalMargins.xlarge}}),text:{padding:index_desktop.Styles.globalMargins.small}})),delete_history_warning=()=>{const $=(0,compiler_runtime.c)(22),navigateUp=constants.ks(_temp);let t0;$[0]!==navigateUp?(t0=()=>{navigateUp()},$[0]=navigateUp,$[1]=t0):t0=$[1];const onCancel=t0,clearModals=constants.ks(_temp2),messageDeleteHistory=chat2.useChatContext(_temp3);let t1;$[2]!==clearModals||$[3]!==messageDeleteHistory?(t1=()=>{clearModals(),messageDeleteHistory()},$[2]=clearModals,$[3]=messageDeleteHistory,$[4]=t1):t1=$[4];const onDeleteHistory=t1;let t2,t3,t4,t5,t6,t7,t8,t9,t10;return $[5]!==onCancel?(t2=index_desktop.Styles.isMobile&&(0,jsx_runtime.jsx)(index_desktop.HeaderHocHeader,{onCancel}),$[5]=onCancel,$[6]=t2):t2=$[6],$[7]===Symbol.for("react.memo_cache_sentinel")?(t3=index_desktop.Styles.collapseStyles([index_desktop.Styles.globalStyles.flexBoxColumn,styles.padding,styles.box]),$[7]=t3):t3=$[7],$[8]===Symbol.for("react.memo_cache_sentinel")?(t4=(0,jsx_runtime.jsx)(index_desktop.Icon,{type:index_desktop.Styles.isMobile?"icon-message-deletion-64":"icon-message-deletion-48"}),$[8]=t4):t4=$[8],$[9]===Symbol.for("react.memo_cache_sentinel")?(t5=(0,jsx_runtime.jsx)(index_desktop.Text,{style:{padding:index_desktop.Styles.globalMargins.small},type:"Header",children:"Delete conversation history?"}),t6=(0,jsx_runtime.jsx)(index_desktop.Text,{center:index_desktop.Styles.isMobile,style:styles.text,type:"Body",children:"You are about to delete all the messages in this conversation. For everyone."}),$[9]=t5,$[10]=t6):(t5=$[9],t6=$[10]),$[11]!==onCancel?(t7=(0,jsx_runtime.jsx)(index_desktop.Button,{type:"Dim",style:styles.button,onClick:onCancel,label:"Cancel",fullWidth:index_desktop.Styles.isMobile}),$[11]=onCancel,$[12]=t7):t7=$[12],$[13]!==onDeleteHistory?(t8=(0,jsx_runtime.jsx)(index_desktop.Button,{type:"Danger",style:styles.button,onClick:onDeleteHistory,label:"Yes, clear for everyone",fullWidth:index_desktop.Styles.isMobile}),$[13]=onDeleteHistory,$[14]=t8):t8=$[14],$[15]!==t7||$[16]!==t8?(t9=(0,jsx_runtime.jsxs)(index_desktop.Box,{style:t3,children:[t4,t5,t6,(0,jsx_runtime.jsxs)(index_desktop.Box,{style:styles.buttonBox,children:[t7,t8]})]}),$[15]=t7,$[16]=t8,$[17]=t9):t9=$[17],$[18]!==onCancel||$[19]!==t2||$[20]!==t9?(t10=(0,jsx_runtime.jsxs)(maybe_popup,{onClose:onCancel,children:[t2,t9]}),$[18]=onCancel,$[19]=t2,$[20]=t9,$[21]=t10):t10=$[21],t10};function _temp(s){return s.dispatch.navigateUp}function _temp2(s_0){return s_0.dispatch.clearModals}function _temp3(s_1){return s_1.dispatch.messageDeleteHistory}}}]);
//# sourceMappingURL=4954.bundle.js.map