{"version":3,"file":"DOoin0u9.js","sources":["../../../../src/composables/dialogs/useActionPageDialog.ts"],"sourcesContent":["import { DialogIdent, useDialogStore } from '@/stores/useDialogStore';\nimport type { LineItem } from '~/server/transformers/shop/lineItemTransformer';\nimport type { AddCampaignEvent } from '~/stores/useCart';\n\nexport default function useEditCampaignDialog() {\n const dialogStore = useDialogStore();\n interface openOptions {\n lineItem: LineItem;\n }\n\n interface Result {\n campaignId: string;\n items: AddCampaignEvent['items'];\n quantity: number;\n }\n\n return {\n open: async (data: openOptions) => {\n dialogStore.setHeadline('shop.actions.product.headline');\n return dialogStore.openDialog(DialogIdent.ACTION_PAGE, data);\n },\n getData: () => {\n return dialogStore.getDialogData(DialogIdent.ACTION_PAGE);\n },\n close: (\n campaignId: string,\n items: AddCampaignEvent['items'] = null,\n quantity: number,\n ) => {\n dialogStore.closeDialog({ campaignId, items, quantity });\n },\n isOpen: () => {\n return (\n dialogStore.open && dialogStore.dialogIdent === DialogIdent.ACTION_PAGE\n );\n },\n };\n}\n"],"names":["useEditCampaignDialog","dialogStore","useDialogStore","data","DialogIdent","campaignId","items","quantity"],"mappings":"yCAIA,SAAwBA,GAAwB,CAC9C,MAAMC,EAAcC,IAWb,MAAA,CACL,KAAM,MAAOC,IACXF,EAAY,YAAY,+BAA+B,EAChDA,EAAY,WAAmBG,EAAY,YAAaD,CAAI,GAErE,QAAS,IACAF,EAAY,cAA2BG,EAAY,WAAW,EAEvE,MAAO,CACLC,EACAC,EAAmC,KACnCC,IACG,CACHN,EAAY,YAAY,CAAE,WAAAI,EAAY,MAAAC,EAAO,SAAAC,CAAU,CAAA,CACzD,EACA,OAAQ,IAEJN,EAAY,MAAQA,EAAY,cAAgBG,EAAY,WAEhE,CAEJ"}