{"version":3,"file":"directive.mjs","sources":["../../../../../packages/components/popover/src/directive.ts"],"sourcesContent":["import type ElPopover from './index.vue'\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\n\nconst attachEvents = (el: HTMLElement, binding: DirectiveBinding) => {\n  const popperComponent: InstanceType<typeof ElPopover> =\n    binding.arg || binding.value\n  const popover = popperComponent?.popperRef\n  if (popover) {\n    popover.triggerRef = el\n  }\n}\n\nexport default {\n  mounted(el, binding) {\n    attachEvents(el, binding)\n  },\n  updated(el, binding) {\n    attachEvents(el, binding)\n  },\n} as ObjectDirective\n\nexport const VPopover = 'popover'\n"],"names":[],"mappings":"AAGA,MAAM,YAAA,GAAe,CAAC,EAAA,EAAiB,OAA8B,KAAA;AACnE,EAAM,MAAA,eAAA,GACJ,OAAQ,CAAA,GAAA,IAAO,OAAQ,CAAA,KAAA,CAAA;AACzB,EAAA,MAAM,UAAU,eAAiB,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAA,SAAA,CAAA;AACjC,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,OAAA,CAAQ,UAAa,GAAA,EAAA,CAAA;AAAA,GACvB;AACF,CAAA,CAAA;AAEA,yBAAe;AAAA,EACb,OAAA,CAAQ,IAAI,OAAS,EAAA;AACnB,IAAA,YAAA,CAAa,IAAI,OAAO,CAAA,CAAA;AAAA,GAC1B;AAAA,EACA,OAAA,CAAQ,IAAI,OAAS,EAAA;AACnB,IAAA,YAAA,CAAa,IAAI,OAAO,CAAA,CAAA;AAAA,GAC1B;AACF,CAAA,CAAA;AAEO,MAAM,QAAW,GAAA;;;;"}