{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/calendar-08","type":"registry:component","title":"Calendar 8","description":"Localized calendar with language switching between English and Hindi","registryDependencies":["calendar","card","select"],"files":[{"path":"src/registry/new-york/components/calendar/calendar-08.tsx","content":"'use client'\n\nimport { useState } from 'react'\n\nimport { type DateRange } from 'react-day-picker'\nimport { enUS, hi } from 'react-day-picker/locale'\n\nimport { Calendar } from '@/registry/new-york/ui/calendar'\nimport { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle } from '@/registry/new-york/ui/card'\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/registry/new-york/ui/select'\n\nconst localizedStrings = {\n  en: {\n    title: 'Book an appointment',\n    description: 'Select the dates for your appointment'\n  },\n  hi: {\n    title: 'अपॉइंटमेंट बुक करें',\n    description: 'अपनी अपॉइंटमेंट के लिए तारीखें चुनें'\n  }\n} as const\n\nexport function CalendarLocalizationDemo() {\n  const [locale, setLocale] = useState<keyof typeof localizedStrings>('en')\n\n  const [dateRange, setDateRange] = useState<DateRange | undefined>({\n    from: new Date(2025, 8, 9),\n    to: new Date(2025, 8, 17)\n  })\n\n  return (\n    <div>\n      <Card className='w-2xs shadow-none'>\n        <CardHeader className='border-b'>\n          <CardTitle>{localizedStrings[locale].title}</CardTitle>\n          <CardDescription>{localizedStrings[locale].description}</CardDescription>\n          <CardAction>\n            <Select value={locale} onValueChange={value => setLocale(value as keyof typeof localizedStrings)}>\n              <SelectTrigger className='w-[100px]' aria-label='Select language'>\n                <SelectValue placeholder='Language' />\n              </SelectTrigger>\n              <SelectContent align='end'>\n                <SelectItem value='hi'>Hindi</SelectItem>\n                <SelectItem value='en'>English</SelectItem>\n              </SelectContent>\n            </Select>\n          </CardAction>\n        </CardHeader>\n        <CardContent>\n          <Calendar\n            mode='range'\n            selected={dateRange}\n            onSelect={setDateRange}\n            defaultMonth={dateRange?.from}\n            locale={locale === 'hi' ? hi : enUS}\n            numerals={locale === 'hi' ? 'deva' : 'latn'}\n            className='w-full bg-transparent p-0'\n            buttonVariant='outline'\n          />\n        </CardContent>\n      </Card>\n      <p className='text-muted-foreground mt-3 text-center text-xs' role='region'>\n        Localize calendar\n      </p>\n    </div>\n  )\n}\n\nexport default CalendarLocalizationDemo\n","type":"registry:component","target":"components/shadcn-studio/calendar/calendar-08.tsx"}]}