{"version":3,"file":"useConfirmationDialog-DS8z3zQC.js","sources":["../../../frontend/src/Hooks/useConfirmationDialog.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Button } from '@mui/material';\nimport { useIntl } from 'react-intl';\n\nimport Dialog from '../Components/DesignSystem/Dialog';\n\ninterface DialogProps {\n title: string;\n content: string | React.ReactNode;\n label: string;\n confirmText?: string;\n cancelText?: string;\n}\n\ninterface UseConfirmationDialogReturn {\n dialog: React.ReactNode;\n confirm: (config: DialogProps) => Promise;\n}\n\ntype ConfirmationStatus = 'confirm' | 'cancel';\n\nexport default function useConfirmationDialog(id: string): UseConfirmationDialogReturn {\n const intl = useIntl();\n const [open, setOpen] = React.useState(false);\n const defaultDialogProps: DialogProps = {\n title: intl.formatMessage({ id: 'GENERIC_CONFIRM_DELETE.TITLE' }),\n content: intl.formatMessage({ id: 'GENERIC_CONFIRM_DELETE.CONTENT' }),\n label: '',\n confirmText: intl.formatMessage({ id: 'GENERIC_CONFIRM_DELETE.CTA' }),\n cancelText: intl.formatMessage({ id: 'BUTTONS.NO' }),\n };\n\n const [dialogProps, setDialogProps] = React.useState(defaultDialogProps);\n\n const statusRef = React.useRef(null);\n\n const waitForConfirmation = async () => {\n return new Promise((resolve) => {\n // check every 100ms if the user has clicked to confirm or cancel\n const interval = setInterval(() => {\n if (statusRef.current) {\n // if the user has clicked on a button, we resolve the promise\n // clear the interval\n // and we reset all the states\n clearInterval(interval);\n resolve(statusRef.current === 'confirm');\n statusRef.current = null;\n setDialogProps(defaultDialogProps);\n setOpen(false);\n }\n }, 100);\n });\n };\n\n // confirm but with useCallback\n const confirm = React.useCallback(\n async (config: DialogProps) => {\n setDialogProps({ ...dialogProps, ...config });\n setOpen(true);\n return waitForConfirmation();\n },\n [dialogProps],\n );\n\n const handleAction = (action: ConfirmationStatus) => () => {\n statusRef.current = action;\n };\n\n // You plug this somewhere in your component tree\n const dialog = useMemo(\n () => (\n \n \n \n \n }\n >\n {dialogProps.content}\n \n ),\n [dialogProps, id, open],\n );\n\n return { dialog, confirm };\n}\n"],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","delegateYield","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","toString","Array","from","test","isArray","useConfirmationDialog","id","intl","useIntl","_React$useState","React","useState","_React$useState2","open","setOpen","defaultDialogProps","title","formatMessage","content","label","confirmText","cancelText","_React$useState3","_React$useState4","dialogProps","setDialogProps","statusRef","useRef","waitForConfirmation","_ref","_callee","_context","interval","setInterval","current","clearInterval","confirm","useCallback","_ref2","_callee2","config","_context2","_objectSpread","_x","handleAction","action","dialog","useMemo","createElement","Dialog","concat","onClose","actions","Fragment","Button","variant","onClick"],"mappings":"09CACAA,EAAAA,UAAAC,CAAAA,OAAAA,OAAAC,EAAAD,EAAA,CAAA,EAAAE,EAAAC,OAAAC,UAAAC,EAAAH,EAAAI,eAAAC,EAAAJ,OAAAK,gBAAAP,SAAAA,EAAAD,EAAAE,GAAAD,EAAAD,CAAA,EAAAE,EAAAO,KAAAA,EAAAC,EAAAC,OAAAA,QAAA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