{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"marketing-careers-featured-job-slider","type":"registry:block","title":"Featured Job Slider","files":[{"path":"components/blocks/marketing/careers/featured-job-slider.tsx","content":"import * as React from 'react';\n\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardFooter,\n  CardHeader,\n  CardTitle,\n} from '@/components/ui/card';\nimport {\n  Carousel,\n  CarouselContent,\n  CarouselItem,\n  CarouselNext,\n  CarouselPrevious,\n} from '@/components/ui/carousel';\nimport {\n  BriefcaseIcon,\n  BuildingIcon,\n  MapPinIcon,\n  DollarSignIcon,\n  StarIcon,\n  BookmarkIcon,\n  TrendingUpIcon,\n  BarChartIcon,\n  UsersIcon,\n  CalendarIcon,\n} from 'lucide-react';\n\ninterface JobPosition {\n  id: string;\n  title: string;\n  department: string;\n  companyName: string;\n  companyLogo: string;\n  location: string;\n  locationType: 'remote' | 'onsite' | 'hybrid';\n  employmentType: 'full-time' | 'part-time' | 'contract' | 'internship';\n  experienceLevel: 'entry' | 'mid' | 'senior' | 'lead' | 'executive';\n  postedDate: string;\n  salary: string;\n  description: string;\n  featured: boolean;\n  highlight: 'new' | 'trending' | 'competitive' | 'popular' | undefined;\n  perks: string[];\n}\n\nexport default function FeaturedJobSlider() {\n  // Sample job position data\n  const jobPositions: JobPosition[] = [\n    {\n      id: 'senior-frontend-engineer',\n      title: 'Senior Frontend Engineer',\n      department: 'Engineering',\n      companyName: 'TechVision',\n      companyLogo: 'https://cdn.worldvectorlogo.com/logos/react-2.svg',\n      location: 'San Francisco, CA',\n      locationType: 'hybrid',\n      employmentType: 'full-time',\n      experienceLevel: 'senior',\n      postedDate: '2023-09-15',\n      salary: '$130,000 - $160,000',\n      description:\n        'Lead the development of our flagship product using React, TypeScript, and modern web technologies. Join a talented team working on cutting-edge solutions.',\n      featured: true,\n      highlight: 'competitive',\n      perks: [\n        'Flexible hours',\n        'Remote options',\n        'Health insurance',\n        '401(k) match',\n        'Learning budget',\n      ],\n    },\n    {\n      id: 'product-manager',\n      title: 'Product Manager',\n      department: 'Product',\n      companyName: 'InnovateCorp',\n      companyLogo:\n        'https://upload.wikimedia.org/wikipedia/commons/3/33/Figma-logo.svg',\n      location: 'New York, NY',\n      locationType: 'hybrid',\n      employmentType: 'full-time',\n      experienceLevel: 'senior',\n      postedDate: '2023-09-18',\n      salary: '$120,000 - $150,000',\n      description:\n        'Define the product vision and strategy for our SaaS platform. Collaborate with cross-functional teams to deliver exceptional user experiences.',\n      featured: true,\n      highlight: 'new',\n      perks: [\n        'Unlimited PTO',\n        'Health benefits',\n        'Remote work options',\n        'Stock options',\n        'Catered lunches',\n      ],\n    },\n    {\n      id: 'senior-data-scientist',\n      title: 'Senior Data Scientist',\n      department: 'Data Science',\n      companyName: 'DataDriven',\n      companyLogo: 'https://cdn.worldvectorlogo.com/logos/python-5.svg',\n      location: 'Remote',\n      locationType: 'remote',\n      employmentType: 'full-time',\n      experienceLevel: 'senior',\n      postedDate: '2023-09-16',\n      salary: '$140,000 - $170,000',\n      description:\n        'Apply machine learning and statistical techniques to solve complex business problems. Work with large datasets to extract insights and drive decision-making.',\n      featured: true,\n      highlight: 'trending',\n      perks: [\n        'Remote-first culture',\n        'Flexible schedule',\n        'Quarterly team retreats',\n        'Health & wellness stipend',\n        'Home office budget',\n      ],\n    },\n    {\n      id: 'software-architect',\n      title: 'Software Architect',\n      department: 'Engineering',\n      companyName: 'CloudNative',\n      companyLogo: 'https://cdn.worldvectorlogo.com/logos/aws-2.svg',\n      location: 'Seattle, WA',\n      locationType: 'hybrid',\n      employmentType: 'full-time',\n      experienceLevel: 'lead',\n      postedDate: '2023-09-14',\n      salary: '$160,000 - $190,000',\n      description:\n        'Design and lead the development of scalable, cloud-native applications. Drive technical decisions and mentor junior engineers in best practices.',\n      featured: true,\n      highlight: 'competitive',\n      perks: [\n        'Competitive salary',\n        'Stock options',\n        '401(k) with 6% match',\n        'Comprehensive healthcare',\n        'Professional development budget',\n      ],\n    },\n    {\n      id: 'ux-design-lead',\n      title: 'UX Design Lead',\n      department: 'Design',\n      companyName: 'CreativeMinds',\n      companyLogo: 'https://cdn.worldvectorlogo.com/logos/adobe-2.svg',\n      location: 'Los Angeles, CA',\n      locationType: 'onsite',\n      employmentType: 'full-time',\n      experienceLevel: 'lead',\n      postedDate: '2023-09-17',\n      salary: '$130,000 - $160,000',\n      description:\n        'Lead a team of designers to create intuitive, engaging user experiences. Collaborate with product and engineering teams to deliver cohesive products.',\n      featured: true,\n      highlight: 'popular',\n      perks: [\n        'Creative studio environment',\n        'Latest design tools',\n        'Healthcare coverage',\n        'Gym membership',\n        'Casual dress code',\n      ],\n    },\n    {\n      id: 'backend-engineer',\n      title: 'Backend Engineer',\n      department: 'Engineering',\n      companyName: 'ServerStack',\n      companyLogo: 'https://cdn.worldvectorlogo.com/logos/nodejs-1.svg',\n      location: 'Boston, MA',\n      locationType: 'hybrid',\n      employmentType: 'full-time',\n      experienceLevel: 'mid',\n      postedDate: '2023-09-20',\n      salary: '$115,000 - $140,000',\n      description:\n        'Develop scalable backend services and APIs using modern technologies. Collaborate with frontend teams to integrate user interfaces.',\n      featured: true,\n      highlight: 'new',\n      perks: [\n        'Flexible working hours',\n        'Remote options',\n        'Healthcare',\n        'Wellness program',\n        'Professional development',\n      ],\n    },\n  ];\n\n  // Calculate days ago from date\n  const getDaysAgo = (dateString: string) => {\n    const postDate = new Date(dateString);\n    const today = new Date();\n    const diffTime = Math.abs(today.getTime() - postDate.getTime());\n    const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));\n\n    if (diffDays === 0) {\n      return 'Today';\n    } else if (diffDays === 1) {\n      return 'Yesterday';\n    } else {\n      return `${diffDays} days ago`;\n    }\n  };\n\n  // Format location type for display\n  const formatLocationType = (type: string) => {\n    switch (type) {\n      case 'remote':\n        return 'Remote';\n      case 'hybrid':\n        return 'Hybrid';\n      case 'onsite':\n        return 'On-site';\n      default:\n        return type;\n    }\n  };\n\n  // Format employment type for display\n  const formatEmploymentType = (type: string) => {\n    switch (type) {\n      case 'full-time':\n        return 'Full-time';\n      case 'part-time':\n        return 'Part-time';\n      case 'contract':\n        return 'Contract';\n      case 'internship':\n        return 'Internship';\n      default:\n        return type;\n    }\n  };\n\n  // Get appropriate highlight icon and color\n  const getHighlightDetails = (highlight: JobPosition['highlight']) => {\n    switch (highlight) {\n      case 'new':\n        return {\n          icon: <StarIcon className=\"h-4 w-4\" />,\n          label: 'New',\n          color:\n            'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300',\n        };\n      case 'trending':\n        return {\n          icon: <TrendingUpIcon className=\"h-4 w-4\" />,\n          label: 'Trending',\n          color:\n            'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300',\n        };\n      case 'competitive':\n        return {\n          icon: <BarChartIcon className=\"h-4 w-4\" />,\n          label: 'Competitive',\n          color:\n            'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300',\n        };\n      case 'popular':\n        return {\n          icon: <UsersIcon className=\"h-4 w-4\" />,\n          label: 'Popular',\n          color:\n            'bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-300',\n        };\n      default:\n        return null;\n    }\n  };\n\n  return (\n    <div className=\"container mx-auto px-4 py-12\">\n      <div className=\"mb-10 text-center\">\n        <h2 className=\"mb-4 text-3xl font-bold tracking-tight\">\n          Featured Opportunities\n        </h2>\n        <p className=\"text-muted-foreground mx-auto max-w-2xl\">\n          Discover our handpicked selection of top job opportunities from\n          leading companies. These positions offer competitive salaries, great\n          benefits, and exciting career growth.\n        </p>\n      </div>\n\n      <Carousel\n        opts={{\n          align: 'start',\n          loop: true,\n        }}\n        className=\"w-full\"\n      >\n        <CarouselContent className=\"-ml-2 md:-ml-4\">\n          {jobPositions.map((job) => {\n            const highlightDetails = job.highlight\n              ? getHighlightDetails(job.highlight)\n              : null;\n\n            return (\n              <CarouselItem\n                key={job.id}\n                className=\"pl-2 sm:basis-1/2 md:pl-4 lg:basis-1/3\"\n              >\n                <Card className=\"flex h-full flex-col\">\n                  <CardHeader className=\"pb-2\">\n                    <div className=\"flex items-start justify-between\">\n                      <div className=\"bg-card relative flex h-12 w-12 items-center justify-center rounded-md border\">\n                        <div className=\"absolute flex h-full w-full items-center justify-center\">\n                          {job.companyLogo ? (\n                            <img\n                              src={job.companyLogo}\n                              alt={job.companyName}\n                              width={48}\n                              height={48}\n                              className=\"h-12 w-12 object-contain\"\n                            />\n                          ) : (\n                            <BuildingIcon className=\"text-muted-foreground h-6 w-6\" />\n                          )}\n                        </div>\n                      </div>\n                      {highlightDetails && (\n                        <Badge\n                          variant=\"secondary\"\n                          className={`flex items-center gap-1 ${highlightDetails.color}`}\n                        >\n                          {highlightDetails.icon}\n                          {highlightDetails.label}\n                        </Badge>\n                      )}\n                    </div>\n                    <div className=\"mt-3\">\n                      <CardTitle>{job.title}</CardTitle>\n                      <div className=\"mt-1 flex items-center gap-1\">\n                        <BuildingIcon className=\"text-muted-foreground h-3.5 w-3.5\" />\n                        <CardDescription className=\"!mt-0\">\n                          {job.companyName}\n                        </CardDescription>\n                      </div>\n                    </div>\n                  </CardHeader>\n                  <CardContent className=\"flex flex-grow flex-col gap-3\">\n                    <div className=\"space-y-2\">\n                      <div className=\"flex items-center gap-2\">\n                        <MapPinIcon className=\"text-muted-foreground h-4 w-4\" />\n                        <span className=\"text-sm\">{job.location}</span>\n                        <Badge variant=\"outline\" className=\"ml-auto text-xs\">\n                          {formatLocationType(job.locationType)}\n                        </Badge>\n                      </div>\n                      <div className=\"flex items-center gap-2\">\n                        <BriefcaseIcon className=\"text-muted-foreground h-4 w-4\" />\n                        <span className=\"text-sm\">{job.department}</span>\n                        <Badge variant=\"outline\" className=\"ml-auto text-xs\">\n                          {formatEmploymentType(job.employmentType)}\n                        </Badge>\n                      </div>\n                      <div className=\"flex items-center gap-2\">\n                        <DollarSignIcon className=\"text-muted-foreground h-4 w-4\" />\n                        <span className=\"text-sm\">{job.salary}</span>\n                      </div>\n                      <div className=\"flex items-center gap-2\">\n                        <CalendarIcon className=\"text-muted-foreground h-4 w-4\" />\n                        <span className=\"text-sm\">\n                          Posted {getDaysAgo(job.postedDate)}\n                        </span>\n                      </div>\n                    </div>\n\n                    <p className=\"text-muted-foreground mt-2 text-sm\">\n                      {job.description}\n                    </p>\n\n                    <div className=\"mt-auto\">\n                      <p className=\"text-muted-foreground mb-1.5 text-xs font-medium\">\n                        Perks & Benefits:\n                      </p>\n                      <div className=\"flex flex-wrap gap-1.5\">\n                        {job.perks.slice(0, 3).map((perk, index) => (\n                          <Badge\n                            variant=\"secondary\"\n                            key={index}\n                            className=\"text-xs\"\n                          >\n                            {perk}\n                          </Badge>\n                        ))}\n                        {job.perks.length > 3 && (\n                          <Badge variant=\"outline\" className=\"text-xs\">\n                            +{job.perks.length - 3} more\n                          </Badge>\n                        )}\n                      </div>\n                    </div>\n                  </CardContent>\n                  <CardFooter className=\"flex gap-3 pt-2\">\n                    <Button variant=\"outline\" size=\"sm\" className=\"w-1/2\">\n                      <BookmarkIcon className=\"mr-1 h-4 w-4\" />\n                      Save\n                    </Button>\n                    <Button size=\"sm\" className=\"w-1/2\">\n                      Apply Now\n                    </Button>\n                  </CardFooter>\n                </Card>\n              </CarouselItem>\n            );\n          })}\n        </CarouselContent>\n        <div className=\"mt-8 flex justify-center\">\n          <CarouselPrevious className=\"relative static mr-2 lg:absolute\" />\n          <CarouselNext className=\"relative static ml-2 lg:absolute\" />\n        </div>\n      </Carousel>\n\n      <div className=\"mt-12 text-center\">\n        <Button asChild variant=\"default\" size=\"lg\" className=\"px-8\">\n          <a href=\"#\">View All Positions</a>\n        </Button>\n      </div>\n    </div>\n  );\n}\n","type":"registry:component","target":"components/blocks/marketing/careers/featured-job-slider.tsx"},{"path":"components/ui/badge.tsx","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n  \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n        secondary:\n          \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n        destructive:\n          \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n        outline:\n          \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction Badge({\n  className,\n  variant = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n  const Comp = asChild ? Slot.Root : \"span\"\n\n  return (\n    <Comp\n      data-slot=\"badge\"\n      data-variant={variant}\n      className={cn(badgeVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\n\nexport { Badge, badgeVariants }\n","type":"registry:ui","target":"components/ui/badge.tsx"},{"path":"components/ui/button.tsx","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n  \"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n        outline:\n          \"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n        destructive:\n          \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default:\n          \"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        xs: \"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n        sm: \"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5\",\n        lg: \"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        icon: \"size-9\",\n        \"icon-xs\":\n          \"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3\",\n        \"icon-sm\":\n          \"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md\",\n        \"icon-lg\": \"size-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot.Root : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      data-variant={variant}\n      data-size={size}\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n","type":"registry:ui","target":"components/ui/button.tsx"},{"path":"components/ui/card.tsx","content":"import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Card({\n  className,\n  size = \"default\",\n  ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n  return (\n    <div\n      data-slot=\"card\"\n      data-size={size}\n      className={cn(\n        \"group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-header\"\n      className={cn(\n        \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-title\"\n      className={cn(\n        \"font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-description\"\n      className={cn(\"text-sm text-muted-foreground\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-action\"\n      className={cn(\n        \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-content\"\n      className={cn(\"px-6 group-data-[size=sm]/card:px-4\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-footer\"\n      className={cn(\n        \"flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Card,\n  CardHeader,\n  CardFooter,\n  CardTitle,\n  CardAction,\n  CardDescription,\n  CardContent,\n}\n","type":"registry:ui","target":"components/ui/card.tsx"},{"path":"components/ui/carousel.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\nimport useEmblaCarousel, {\n  type UseEmblaCarouselType,\n} from \"embla-carousel-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"lucide-react\"\n\ntype CarouselApi = UseEmblaCarouselType[1]\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>\ntype CarouselOptions = UseCarouselParameters[0]\ntype CarouselPlugin = UseCarouselParameters[1]\n\ntype CarouselProps = {\n  opts?: CarouselOptions\n  plugins?: CarouselPlugin\n  orientation?: \"horizontal\" | \"vertical\"\n  setApi?: (api: CarouselApi) => void\n}\n\ntype CarouselContextProps = {\n  carouselRef: ReturnType<typeof useEmblaCarousel>[0]\n  api: ReturnType<typeof useEmblaCarousel>[1]\n  scrollPrev: () => void\n  scrollNext: () => void\n  canScrollPrev: boolean\n  canScrollNext: boolean\n} & CarouselProps\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null)\n\nfunction useCarousel() {\n  const context = React.useContext(CarouselContext)\n\n  if (!context) {\n    throw new Error(\"useCarousel must be used within a <Carousel />\")\n  }\n\n  return context\n}\n\nfunction Carousel({\n  orientation = \"horizontal\",\n  opts,\n  setApi,\n  plugins,\n  className,\n  children,\n  ...props\n}: React.ComponentProps<\"div\"> & CarouselProps) {\n  const [carouselRef, api] = useEmblaCarousel(\n    {\n      ...opts,\n      axis: orientation === \"horizontal\" ? \"x\" : \"y\",\n    },\n    plugins\n  )\n  const [canScrollPrev, setCanScrollPrev] = React.useState(false)\n  const [canScrollNext, setCanScrollNext] = React.useState(false)\n\n  const onSelect = React.useCallback((api: CarouselApi) => {\n    if (!api) return\n    setCanScrollPrev(api.canScrollPrev())\n    setCanScrollNext(api.canScrollNext())\n  }, [])\n\n  const scrollPrev = React.useCallback(() => {\n    api?.scrollPrev()\n  }, [api])\n\n  const scrollNext = React.useCallback(() => {\n    api?.scrollNext()\n  }, [api])\n\n  const handleKeyDown = React.useCallback(\n    (event: React.KeyboardEvent<HTMLDivElement>) => {\n      if (event.key === \"ArrowLeft\") {\n        event.preventDefault()\n        scrollPrev()\n      } else if (event.key === \"ArrowRight\") {\n        event.preventDefault()\n        scrollNext()\n      }\n    },\n    [scrollPrev, scrollNext]\n  )\n\n  React.useEffect(() => {\n    if (!api || !setApi) return\n    setApi(api)\n  }, [api, setApi])\n\n  React.useEffect(() => {\n    if (!api) return\n    onSelect(api)\n    api.on(\"reInit\", onSelect)\n    api.on(\"select\", onSelect)\n\n    return () => {\n      api?.off(\"select\", onSelect)\n    }\n  }, [api, onSelect])\n\n  return (\n    <CarouselContext.Provider\n      value={{\n        carouselRef,\n        api: api,\n        opts,\n        orientation:\n          orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n        scrollPrev,\n        scrollNext,\n        canScrollPrev,\n        canScrollNext,\n      }}\n    >\n      <div\n        onKeyDownCapture={handleKeyDown}\n        className={cn(\"relative\", className)}\n        role=\"region\"\n        aria-roledescription=\"carousel\"\n        data-slot=\"carousel\"\n        {...props}\n      >\n        {children}\n      </div>\n    </CarouselContext.Provider>\n  )\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  const { carouselRef, orientation } = useCarousel()\n\n  return (\n    <div\n      ref={carouselRef}\n      className=\"overflow-hidden\"\n      data-slot=\"carousel-content\"\n    >\n      <div\n        className={cn(\n          \"flex\",\n          orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n          className\n        )}\n        {...props}\n      />\n    </div>\n  )\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<\"div\">) {\n  const { orientation } = useCarousel()\n\n  return (\n    <div\n      role=\"group\"\n      aria-roledescription=\"slide\"\n      data-slot=\"carousel-item\"\n      className={cn(\n        \"min-w-0 shrink-0 grow-0 basis-full\",\n        orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CarouselPrevious({\n  className,\n  variant = \"outline\",\n  size = \"icon-sm\",\n  ...props\n}: React.ComponentProps<typeof Button>) {\n  const { orientation, scrollPrev, canScrollPrev } = useCarousel()\n\n  return (\n    <Button\n      data-slot=\"carousel-previous\"\n      variant={variant}\n      size={size}\n      className={cn(\n        \"absolute touch-manipulation rounded-full\",\n        orientation === \"horizontal\"\n          ? \"top-1/2 -left-12 -translate-y-1/2\"\n          : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n        className\n      )}\n      disabled={!canScrollPrev}\n      onClick={scrollPrev}\n      {...props}\n    >\n      <ChevronLeftIcon />\n      <span className=\"sr-only\">Previous slide</span>\n    </Button>\n  )\n}\n\nfunction CarouselNext({\n  className,\n  variant = \"outline\",\n  size = \"icon-sm\",\n  ...props\n}: React.ComponentProps<typeof Button>) {\n  const { orientation, scrollNext, canScrollNext } = useCarousel()\n\n  return (\n    <Button\n      data-slot=\"carousel-next\"\n      variant={variant}\n      size={size}\n      className={cn(\n        \"absolute touch-manipulation rounded-full\",\n        orientation === \"horizontal\"\n          ? \"top-1/2 -right-12 -translate-y-1/2\"\n          : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n        className\n      )}\n      disabled={!canScrollNext}\n      onClick={scrollNext}\n      {...props}\n    >\n      <ChevronRightIcon />\n      <span className=\"sr-only\">Next slide</span>\n    </Button>\n  )\n}\n\nexport {\n  type CarouselApi,\n  Carousel,\n  CarouselContent,\n  CarouselItem,\n  CarouselPrevious,\n  CarouselNext,\n  useCarousel,\n}\n","type":"registry:ui","target":"components/ui/carousel.tsx"}],"description":"A horizontal slider of featured job cards with title, team, and location. Spotlights priority roles you want candidates to notice on the careers page.","dependencies":["class-variance-authority","embla-carousel-react","lucide-react","radix-ui"]}