{"version":3,"names":["dynamic","createSignal","omit","composeRefs","userRef","mergeRootProps","resolveClassStyle","SelectGroupContext","EMPTY_STATE","SelectGroup","props","labelId","setLabelId","undefined","ownedWrite","contextValue","internal","role","aria-labelledby","userClassStyle","userProps","merged","Tag","as"],"sources":["select-group.tsx"],"sourcesContent":["import type { JSX, ValidComponent } from \"@solidjs/web\";\nimport { dynamic } from \"@solidjs/web\";\nimport { createSignal, omit } from \"solid-js\";\nimport { composeRefs, userRef } from \"../../internals/compose-refs\";\nimport { mergeRootProps } from \"../../internals/merge-root-props\";\nimport { resolveClassStyle } from \"../../internals/resolve-class-style\";\nimport type { BaseUIComponentProps } from \"../../internals/types\";\nimport {\n\tSelectGroupContext,\n\ttype SelectGroupContextValue,\n} from \"./select-group-context\";\n\n// biome-ignore lint/complexity/noBannedTypes: public empty-state for consumer type references.\nexport type SelectGroupState = {};\n\nexport interface SelectGroupProps\n\textends BaseUIComponentProps<\"div\", SelectGroupState> {\n\tas?: ValidComponent;\n}\n\nconst EMPTY_STATE: SelectGroupState = {};\n\n/**\n * `<Select.Group>` — a `<div role=\"group\">` that wires `aria-labelledby` to a\n * child `<Select.GroupLabel>`.\n */\nexport function SelectGroup(props: SelectGroupProps): JSX.Element {\n\tconst [labelId, setLabelId] = createSignal<string | undefined>(undefined, {\n\t\townedWrite: true,\n\t});\n\n\tconst contextValue: SelectGroupContextValue = {\n\t\tlabelId,\n\t\tsetLabelId,\n\t};\n\n\tconst internal = {\n\t\trole: \"group\" as const,\n\t\tget \"aria-labelledby\"() {\n\t\t\treturn labelId() ?? \"\";\n\t\t},\n\t};\n\n\tconst userClassStyle = resolveClassStyle(props, () => EMPTY_STATE);\n\tconst userProps = omit(props, \"as\", \"class\", \"style\", \"attrs\");\n\n\tlet merged: Record<string, unknown> = mergeRootProps(\n\t\tinternal,\n\t\tuserClassStyle,\n\t);\n\tmerged = mergeRootProps(merged, userProps);\n\n\tconst Tag = dynamic(() => props.as ?? \"div\");\n\treturn (\n\t\t<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