{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "province-select",
  "type": "registry:ui",
  "title": "ProvinceSelect",
  "description": "انتخاب یکی از ۳۱ استان با جستجو؛ با نام مرکز استان هم پیدا می‌شود (مثلاً «مشهد»)",
  "dependencies": [
    "@kashi-ui/persian@^1.7.0"
  ],
  "registryDependencies": [
    "https://kashi.sepantapouya.com/r/combobox.json",
    "https://kashi.sepantapouya.com/r/cx.json",
    "https://kashi.sepantapouya.com/r/kashi-provider.json"
  ],
  "files": [
    {
      "path": "registry/kashi/ProvinceSelect.tsx",
      "type": "registry:ui",
      "target": "components/kashi/ProvinceSelect.tsx",
      "content": "\"use client\";\n\nimport { forwardRef } from \"react\";\nimport { PROVINCES } from \"@kashi-ui/persian\";\nimport { Combobox, type ComboboxProps } from \"./Combobox\";\nimport { useKashi } from \"./KashiProvider\";\n\nexport interface ProvinceSelectProps extends Omit<ComboboxProps, \"options\"> {\n  /** نمایش مرکز استان زیر نام @default true */\n  showCapital?: boolean;\n}\n\nconst options = (capital: boolean, label: (c: string) => string) =>\n  PROVINCES.map((p) => ({ value: p.name, label: p.name, description: capital ? label(p.capital) : undefined, keywords: [p.capital] }));\n\n/** انتخاب یکی از ۳۱ استان با جستجو؛ با نام مرکز استان هم پیدا می‌شود (مثلاً «مشهد») */\nexport const ProvinceSelect = forwardRef<HTMLInputElement, ProvinceSelectProps>(function ProvinceSelect(\n  { showCapital = true, label, placeholder, ...rest },\n  ref,\n) {\n  const { messages: M } = useKashi();\n  return <Combobox ref={ref} label={label ?? M.province.label} placeholder={placeholder ?? M.province.search} options={options(showCapital, M.province.capital)} {...rest} />;\n});\n"
    }
  ]
}