{"version":3,"file":"DialogTrigger.vue_vue_type_script_setup_true_lang-CQ-bK6Cc.js","sources":["../../node_modules/reka-ui/dist/Dialog/DialogTrigger.js","../../src/components/ui/dialog/DialogTrigger.vue"],"sourcesContent":["import { defineComponent, onMounted, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';\nimport { i as injectDialogRootContext } from './DialogRoot.js';\nimport { u as useForwardExpose } from '../shared/useForwardExpose.js';\nimport { u as useId } from '../shared/useId.js';\nimport { P as Primitive } from '../Primitive/Primitive.js';\n\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"DialogTrigger\",\n props: {\n asChild: { type: Boolean },\n as: { default: \"button\" }\n },\n setup(__props) {\n const props = __props;\n const rootContext = injectDialogRootContext();\n const { forwardRef, currentElement } = useForwardExpose();\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\");\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value;\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(unref(Primitive), mergeProps(props, {\n ref: unref(forwardRef),\n type: _ctx.as === \"button\" ? \"button\" : undefined,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": unref(rootContext).open.value || false,\n \"aria-controls\": unref(rootContext).open.value ? unref(rootContext).contentId : undefined,\n \"data-state\": unref(rootContext).open.value ? \"open\" : \"closed\",\n onClick: unref(rootContext).onOpenToggle\n }), {\n default: withCtx(() => [\n renderSlot(_ctx.$slots, \"default\")\n ]),\n _: 3\n }, 16, [\"type\", \"aria-expanded\", \"aria-controls\", \"data-state\", \"onClick\"]);\n };\n }\n});\n\nexport { _sfc_main as _ };\n//# sourceMappingURL=DialogTrigger.js.map\n","\n\n\n \n \n \n\n"],"names":["_sfc_main","defineComponent","__name","props","asChild","type","Boolean","as","default","setup","__props","rootContext","injectDialogRootContext","forwardRef","currentElement","useForwardExpose","contentId","useId","onMounted","triggerElement","value","_ctx","_cache","openBlock","createBlock","unref","Primitive","mergeProps","ref","open","onClick","onOpenToggle","withCtx","renderSlot","$slots","_"],"mappings":"6kBAMA,MAAMA,EAA4CC,EAAA,CAChDC,OAAQ,gBACRC,MAAO,CACLC,QAAS,CAAEC,KAAMC,SACjBC,GAAI,CAAEC,QAAS,WAEjB,KAAAC,CAAMC,GACJ,MAAMP,EAAQO,EACRC,EAAcC,KACdC,WAAEA,EAAAC,eAAYA,GAAmBC,IAKhC,OAJPJ,EAAYK,YAAZL,EAAYK,UAAcC,OAAM,EAAW,wBAC3CC,GAAU,KACIP,EAAAQ,eAAeC,MAAQN,EAAeM,KAAA,IAE7C,CAACC,EAAMC,KACLC,IAAaC,EAAYC,EAAMC,GAAYC,EAAWxB,EAAO,CAClEyB,IAAKH,EAAMZ,GACXR,KAAkB,WAAZgB,EAAKd,GAAkB,cAAW,EACxC,gBAAiB,SACjB,gBAAiBkB,EAAMd,GAAakB,KAAKT,QAAS,EAClD,gBAAiBK,EAAMd,GAAakB,KAAKT,MAAQK,EAAMd,GAAaK,eAAY,EAChF,aAAcS,EAAMd,GAAakB,KAAKT,MAAQ,OAAS,SACvDU,QAASL,EAAMd,GAAaoB,eAC1B,CACFvB,QAASwB,GAAQ,IAAM,CACrBC,EAAWZ,EAAKa,OAAQ,cAE1BC,EAAG,GACF,GAAI,CAAC,OAAQ,gBAAiB,gBAAiB,aAAc,YAEtE,8ECjCA,MAAMhC,EAAQO","x_google_ignoreList":[0]}