{"version":3,"names":["Separator","useToolbarRootContext","ToolbarSeparator","props","toolbar","orientation","undefined","toolbarOrientation"],"sources":["toolbar-separator.tsx"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\n\nimport type { Orientation } from \"../internals/types\";\nimport { Separator, type SeparatorProps } from \"../separator/index.ts\";\nimport { useToolbarRootContext } from \"./toolbar-root-context.ts\";\n\nexport interface ToolbarSeparatorProps\n\textends Omit<SeparatorProps, \"orientation\"> {\n\t/**\n\t * Override the separator's orientation. Defaults to the orthogonal of the\n\t * toolbar's orientation (matches React Base UI — a horizontal toolbar uses\n\t * vertical separators and vice-versa).\n\t */\n\torientation?: Orientation | undefined;\n}\n\n/**\n * A separator rendered inside a `<Toolbar.Root>`. Wraps the shared\n * `<Separator>` primitive and flips orientation so the visual divider sits\n * perpendicular to the toolbar's main axis.\n */\nexport function ToolbarSeparator(props: ToolbarSeparatorProps): JSX.Element {\n\t// Optional context read — a standalone `<Toolbar.Separator>` outside a\n\t// `<Toolbar.Root>` should still render (matches React's implicit\n\t// tolerance: it consumes the root context but only to read orientation).\n\tconst toolbar = useToolbarRootContext(true);\n\n\tconst orientation = (): Orientation => {\n\t\tif (props.orientation !== undefined) return props.orientation;\n\t\tconst toolbarOrientation = toolbar.orientation();\n\t\treturn toolbarOrientation === \"horizontal\" ? \"vertical\" : \"horizontal\";\n\t};\n\n\treturn <Separator {...props} orientation={orientation()} />;\n}\n"],"mappings":"AAGA,SAASA,SAAS,QAA6B,uBAAuB;AACtE,SAASC,qBAAqB,QAAQ,2BAA2B;AAYjE;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACC,KAA4B,EAAe;EAC3E;EACA;EACA;EACA,MAAMC,OAAO,GAAGH,qBAAqB,CAAC,IAAI,CAAC;EAE3C,MAAMI,WAAW,GAAGA,CAAA,KAAmB;IACtC,IAAIF,KAAK,CAACE,WAAW,KAAKC,SAAS,EAAE,OAAOH,KAAK,CAACE,WAAW;IAC7D,MAAME,kBAAkB,GAAGH,OAAO,CAACC,WAAW,CAAC,CAAC;IAChD,OAAOE,kBAAkB,KAAK,YAAY,GAAG,UAAU,GAAG,YAAY;EACvE,CAAC;EAED,OAAO,CAAC,SAAS,CAAC,IAAIJ,KAAK,CAAC,CAAC,WAAW,CAAC,CAACE,WAAW,CAAC,CAAC,CAAC,GAAG;AAC5D","ignoreList":[]}