{"version":3,"file":"Confirm-roIQE3tm.js","sources":["../../Client/legacy/Components/Modals/Confirm.tsx"],"sourcesContent":["import { PrimaryBlackButton, PrimaryGreenButton } from '@legacy/Components/FormGroups/Buttons';\r\n\r\nimport Modal, { ModalButtons, ModalText, ModalTitle } from '@legacy/Components/Modals/StandardModal';\r\n\r\nexport default (props: {\r\n /** Required. A flag indicating whether the confirmation modal should be shown. */\r\n visible: boolean;\r\n\r\n /** Required. The statement requiring confirmation. */\r\n message: string | JSX.Element;\r\n\r\n /** Required. The function to execute after the user has confirmed. */\r\n onConfirmed: () => void;\r\n\r\n /** Required. The function to execute after the user has cancelled the confirmation. */\r\n onCancelled: () => void;\r\n\r\n /** Optional. When true, triggers the loading animation on the confirmation button. Defaults to false. */\r\n loading?: boolean;\r\n\r\n /** Optional. A custom CSS class set on the root of the modal. */\r\n className?: string;\r\n\r\n /** Optional. A flag indicating that the customer service disclaimer should be shown. Defaults to true. */\r\n disclaimer?: boolean;\r\n\r\n /** Optional. The title of the confirmation modal. Defaults to \"Are you sure?\" */\r\n}) => (\r\n <Modal\r\n id='alert'\r\n className={`std-confirm-modal-cp ${props.className || ''}`}\r\n show={props.visible}\r\n disableClickOutside={true}\r\n hideFn={() => props.onCancelled()}\r\n >\r\n <ModalTitle>Are you sure?</ModalTitle>\r\n <ModalText>{props.message}</ModalText>\r\n {(props.disclaimer === undefined || props.disclaimer === true) && (\r\n <ModalText>\r\n If you have further questions, please reach out to our Customer Support Team at{' '}\r\n {(window as any).customerSupportPhoneNumber} or by{' '}\r\n <a href={`mailto:${(window as any).CustomerSupportEmail}`}>email</a>.\r\n </ModalText>\r\n )}\r\n <ModalButtons\r\n buttons={[\r\n <PrimaryBlackButton\r\n key='cancel'\r\n label='Cancel'\r\n className='mini-button-cp'\r\n onClick={() => props.onCancelled()}\r\n />,\r\n <PrimaryGreenButton\r\n key='confirm'\r\n label='Confirm'\r\n className='mini-button-cp'\r\n loading={props.loading}\r\n onClick={() => props.onConfirmed()}\r\n />,\r\n ]}\r\n />\r\n </Modal>\r\n);\r\n"],"names":["Confirm","props","jsxs","Modal","jsx","ModalTitle","ModalText","ModalButtons","PrimaryBlackButton","PrimaryGreenButton"],"mappings":"sJAIA,MAAeA,EAACC,GAwBZC,EAAA,KAACC,EAAA,CACG,GAAG,QACH,UAAW,wBAAwBF,EAAM,WAAa,EAAE,GACxD,KAAMA,EAAM,QACZ,oBAAqB,GACrB,OAAQ,IAAMA,EAAM,YAAY,EAEhC,SAAA,CAAAG,EAAAA,IAACC,GAAW,SAAa,eAAA,CAAA,EACzBD,EAAAA,IAACE,EAAW,CAAA,SAAAL,EAAM,OAAQ,CAAA,GACxBA,EAAM,aAAe,QAAaA,EAAM,aAAe,YACpDK,EAAU,CAAA,SAAA,CAAA,kFACyE,IAC9E,OAAe,2BAA2B,SAAO,UAClD,IAAE,CAAA,KAAM,UAAW,OAAe,oBAAoB,GAAI,SAAK,QAAA,EAAI,GAAA,EACxE,EAEJF,EAAA,IAACG,EAAA,CACG,QAAS,CACLH,EAAA,IAACI,EAAA,CAEG,MAAM,SACN,UAAU,iBACV,QAAS,IAAMP,EAAM,YAAY,CAAA,EAH7B,QAIR,EACAG,EAAA,IAACK,EAAA,CAEG,MAAM,UACN,UAAU,iBACV,QAASR,EAAM,QACf,QAAS,IAAMA,EAAM,YAAY,CAAA,EAJ7B,SAAA,CAKR,CACJ,CAAA,CACJ,CAAA,CACJ"}