{"version":3,"file":"index.cjs","names":[],"sources":["../../../src/components/SwitchGroup/SwitchGroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { CSSProperties, forwardRef, ReactElement } from \"react\";\nimport { SwitchItemProps } from \"../SwitchItem\";\n\ntype SwitchGroupVariant = \"clear\" | \"card\" | \"sunk\";\nexport interface SwitchGroupProps {\n  children: ReactElement<SwitchItemProps> | ReactElement<SwitchItemProps>[];\n  className?: string;\n  style?: CSSProperties;\n  variant?: SwitchGroupVariant;\n}\n\nconst variants: Record<SwitchGroupVariant, string> = {\n  clear: \"openui-switch-group-clear\",\n  card: \"openui-switch-group-card\",\n  sunk: \"openui-switch-group-sunk\",\n};\n\nconst SwitchGroup = forwardRef<HTMLDivElement, SwitchGroupProps>((props, ref) => {\n  const { children, className, style, variant = \"clear\" } = props;\n  return (\n    <div\n      ref={ref}\n      className={clsx(\"openui-switch-group\", variants[variant], className)}\n      style={style}\n    >\n      {children}\n    </div>\n  );\n});\n\nSwitchGroup.displayName = \"SwitchGroup\";\n\nexport { SwitchGroup };\n"],"mappings":";;;;;;;AAYA,MAAM,WAA+C;CACnD,OAAO;CACP,MAAM;CACN,MAAM;CACP;AAED,MAAM,eAAA,GAAA,MAAA,aAA4D,OAAO,QAAQ;CAC/E,MAAM,EAAE,UAAU,WAAW,OAAO,UAAU,YAAY;AAC1D,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACO;EACL,YAAA,GAAA,KAAA,SAAgB,uBAAuB,SAAS,UAAU,UAAU;EAC7D;EAEN;EACG,CAAA;EAER;AAEF,YAAY,cAAc"}