{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "model-selector-solid",
  "title": "Model Selector (Solid)",
  "description": "A button that opens a searchable list of models grouped by provider, with their logos, costs and footer actions.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/solid@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup",
    "@kind-ui/picker-solid"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/solid/model-selector.tsx",
      "content": "import { type ModelSelectorOptions, modelSelectorPrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps, JSX } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { omit } from \"solid-js\";\nimport {\n  type PickerContentProps,\n  type PickerFooterAction,\n  type PickerItemProps,\n  type PickerListProps,\n  type PickerRowItemProps,\n  type PickerSectionRowsProps,\n  type PickerTriggerProps,\n  pickerParts,\n} from \"./picker\";\n\nconst parts = createParts(modelSelectorPrimitive, {\n  root: \"div\",\n  trigger: \"button\",\n  content: \"div\",\n  viewport: \"div\",\n  command: \"div\",\n  item: \"span\",\n  note: \"p\",\n});\n\nconst picker = pickerParts(parts);\n\n/**\n * A model, whose `icon` is an image URL or a function that draws an element such as an inline `svg` (a component like\n * `AnthropicLogo` itself), called for each place the icon shows, since an element can sit in only one.\n */\nexport type ModelSelectorModel = Omit<NonNullable<ModelSelectorOptions[\"models\"]>[number], \"icon\"> & {\n  icon?: string | JSX.Element | (() => JSX.Element);\n};\n\nexport type ModelSelectorProps = Omit<\n  ComponentProps<typeof parts.Root>,\n  \"children\" | \"models\" | \"actions\"\n> & {\n  models?: ModelSelectorModel[];\n  /** Footer rows after the models, like \"More models\". */\n  actions?: PickerFooterAction[];\n  children?: JSX.Element;\n};\n\n/**\n * A button that shows the chosen model and its icon, and opens a searchable list of models grouped by provider, with\n * footer `actions`. Any `children` replace the trigger and the list.\n */\nexport function ModelSelector(props: ModelSelectorProps) {\n  return <parts.Root {...omit(props, \"children\")}>{props.children ?? <picker.Default />}</parts.Root>;\n}\n\nexport type ModelSelectorTriggerProps = PickerTriggerProps;\nexport type ModelSelectorContentProps = PickerContentProps;\nexport type ModelSelectorListProps = PickerListProps;\nexport type ModelSelectorSectionRowsProps = PickerSectionRowsProps;\nexport type ModelSelectorRowItemProps = PickerRowItemProps;\nexport type ModelSelectorItemProps = PickerItemProps;\n\n/** Opens the list. Shows the chosen model's icon and name, or the `label` while none is chosen, unless you pass children. */\nexport const ModelSelectorTrigger = picker.Trigger;\n/** The popover: the search field and the list, unless you pass children. Focus moves to the search field. */\nexport const ModelSelectorContent = picker.Content;\n/** UI SDK Command: the search field, the empty text, and every page of rows unless you pass children. */\nexport const ModelSelectorList = picker.List;\n/** A group of rows under its label, or the footer. */\nexport const ModelSelectorSectionRows = picker.SectionRows;\n/** A row: UI SDK's `CommandItem` with the row's props, holding its `ModelSelectorItem` unless you pass children. */\nexport const ModelSelectorRowItem = picker.RowItem;\n/** A row's content: the model's icon, its marked name, its description, and a check when chosen. */\nexport const ModelSelectorItem = picker.Item;\n",
      "type": "registry:ui",
      "target": "@ui/solid/model-selector.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
