{"version":3,"names":["collapsibleTrigger","c","triggerRef","collapsiblePanel","panelRef"],"sources":["collapsible-directives.ts"],"sourcesContent":["/**\n * Top-level directive exports — thin delegators to the api methods\n * {@link CollapsibleApi.triggerRef} / {@link CollapsibleApi.panelRef}\n * (defined inside `createCollapsible`). Either surface works; choose\n * based on import ergonomics.\n *\n * ```tsx\n * // cva-import-friendly form\n * import { collapsibleTrigger, collapsiblePanel } from \"quoin\";\n * <button ref={collapsibleTrigger(c)} />\n *\n * // api-form — no top-level import needed when `c` is already in scope\n * <button ref={c.triggerRef()} />\n * ```\n */\n\nimport type { CollapsibleApi } from \"./create-collapsible.tsx\";\n\n/**\n * Bind trigger behaviour to a `<button>` (or any clickable element).\n * Composes with other refs/directives via the array form:\n *\n * ```tsx\n * <button ref={[collapsibleTrigger(c), userRef]}>Toggle</button>\n * ```\n *\n * Delegates to `c.triggerRef()`.\n */\nexport function collapsibleTrigger(\n\tc: CollapsibleApi,\n): (el: HTMLButtonElement | null) => void {\n\treturn c.triggerRef();\n}\n\n/**\n * Bind panel behaviour to the panel element. Same composition shape as\n * {@link collapsibleTrigger}. Delegates to `c.panelRef()`.\n */\nexport function collapsiblePanel(\n\tc: CollapsibleApi,\n): (el: HTMLElement | null) => void {\n\treturn c.panelRef();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,kBAAkBA,CACjCC,CAAiB,EACwB;EACzC,OAAOA,CAAC,CAACC,UAAU,CAAC,CAAC;AACtB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC/BF,CAAiB,EACkB;EACnC,OAAOA,CAAC,CAACG,QAAQ,CAAC,CAAC;AACpB","ignoreList":[]}