{"version":3,"file":"modalParts.cjs","sources":["../../../../../src/components/ui/modal/modalParts.ts"],"sourcesContent":["/* Static markers identifying Modal's sub-components from an element type without rendering it (compound-vs-convenience mode, close-button exclusion); a marker prop survives memo() wrappers where reference equality wouldn't. */\nexport type ModalPart = 'header' | 'body' | 'footer' | 'closeButton';\n\n// Symbol.for: a registry symbol survives duplicate copies of the library in\n// one bundle, where per-module symbols (like reference equality) would not.\nconst MODAL_PART = Symbol.for('vaneui.modal.part');\n\n/** Tags a component as a Modal structural part. */\nexport function markModalPart(component: object, part: ModalPart): void {\n  (component as Record<symbol, unknown>)[MODAL_PART] = part;\n}\n\nfunction readPart(type: unknown): ModalPart | undefined {\n  if (typeof type !== 'function' && (typeof type !== 'object' || type === null)) return undefined;\n  return (type as Record<symbol, unknown>)[MODAL_PART] as ModalPart | undefined;\n}\n\n/** Resolves the Modal part kind of a React element type, if any. */\nexport function getModalPart(type: unknown): ModalPart | undefined {\n  return readPart(type) ?? readPart((type as { type?: unknown } | null | undefined)?.type);\n}\n"],"names":[],"mappings":";;AAKA,MAAM,UAAA,GAAa,MAAA,CAAO,GAAA,CAAI,mBAAmB,CAAA;AAG1C,SAAS,aAAA,CAAc,WAAmB,IAAA,EAAuB;AACtE,EAAC,SAAA,CAAsC,UAAU,CAAA,GAAI,IAAA;AACvD;AAEA,SAAS,SAAS,IAAA,EAAsC;AACtD,EAAA,IAAI,OAAO,SAAS,UAAA,KAAe,OAAO,SAAS,QAAA,IAAY,IAAA,KAAS,OAAO,OAAO,MAAA;AACtF,EAAA,OAAQ,KAAiC,UAAU,CAAA;AACrD;AAGO,SAAS,aAAa,IAAA,EAAsC;AACjE,EAAA,OAAO,QAAA,CAAS,IAAI,CAAA,IAAK,QAAA,CAAU,MAAgD,IAAI,CAAA;AACzF;;;;;"}