{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "career-4",
  "dependencies": [
    "lucide-react",
    "react-icons"
  ],
  "registryDependencies": [
    "button",
    "select",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/watermelon-ui/career-4.tsx",
      "content": "import { useState, useMemo } from \"react\";\nimport {\n  FiMapPin,\n  FiClock,\n  FiDollarSign,\n  FiArrowRight,\n  FiSearch,\n  FiUsers,\n} from \"react-icons/fi\";\nimport { cn } from \"@/lib/utils\";\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from \"@/components/ui/select\";\n\nexport type JobType =\n  | \"Full-time\"\n  | \"Part-time\"\n  | \"Contract\"\n  | \"Remote\"\n  | \"Internship\";\n\nexport interface Job {\n  id: string | number;\n  title: string;\n  location: string;\n  type: JobType;\n  salaryRange: string;\n  onApply?: (job: Job) => void;\n}\n\nexport interface Career4Props {\n  eyebrow?: string;\n  heading: string;\n  description?: string;\n  jobs: Job[];\n  footerLabel?: string;\n  footerCTA?: string;\n  onFooterCTA?: () => void;\n  className?: string;\n}\nconst DEFAULT_JOBS: Job[] = [\n  {\n    id: 1,\n    title: \"Talent Acquisition Specialist\",\n    location: \"United States\",\n    type: \"Full-time\",\n    salaryRange: \"$100 - $120\",\n    onApply: (j) => alert(`Applying: ${j.title}`),\n  },\n  {\n    id: 2,\n    title: \"Employer Branding Manager\",\n    location: \"United States\",\n    type: \"Full-time\",\n    salaryRange: \"$100 - $120\",\n    onApply: (j) => alert(`Applying: ${j.title}`),\n  },\n  {\n    id: 3,\n    title: \"HR Marketing Strategist\",\n    location: \"United States\",\n    type: \"Part-time\",\n    salaryRange: \"$100 - $120\",\n    onApply: (j) => alert(`Applying: ${j.title}`),\n  },\n  {\n    id: 4,\n    title: \"People & Culture Coordinator\",\n    location: \"United Kingdom\",\n    type: \"Full-time\",\n    salaryRange: \"$100 - $120\",\n    onApply: (j) => alert(`Applying: ${j.title}`),\n  },\n  {\n    id: 5,\n    title: \"Recruitment Marketing Lead\",\n    location: \"United States\",\n    type: \"Remote\",\n    salaryRange: \"$100 - $120\",\n    onApply: (j) => alert(`Applying: ${j.title}`),\n  },\n];\ninterface FilterDropdownProps {\n  label: string;\n  options: string[];\n  value: string;\n  onChange: (v: string) => void;\n}\n\nfunction FilterDropdown({\n  label,\n  options,\n  value,\n  onChange,\n}: FilterDropdownProps) {\n  return (\n    <div className=\"w-full px-3 py-0.5 sm:w-auto\">\n      <Select\n        value={value || \"all\"}\n        onValueChange={(v) => onChange(v === \"all\" ? \"\" : v)}\n      >\n        <SelectTrigger\n          className={cn(\n            \"h-auto w-full border-none bg-transparent px-0 shadow-none focus:ring-0\",\n            \"text-foreground text-sm font-medium focus-visible:ring-transparent\",\n          )}\n        >\n          <SelectValue placeholder={label} />\n        </SelectTrigger>\n        <SelectContent>\n          <SelectItem value=\"all\">{label}</SelectItem>\n          {options.map((o) => (\n            <SelectItem key={o} value={o}>\n              {o}\n            </SelectItem>\n          ))}\n        </SelectContent>\n      </Select>\n    </div>\n  );\n}\n\nfunction JobRow({ job, isLast }: { job: Job; isLast: boolean }) {\n  return (\n    <div\n      className={cn(\n        \"group flex flex-col justify-between gap-4 py-6 sm:flex-row sm:items-center sm:gap-6\",\n        \"transition-colors duration-150\",\n        !isLast && \"border-border border-b\",\n      )}\n    >\n      <div className=\"flex min-w-0 flex-col gap-1.5\">\n        <h3 className=\"text-foreground text-base leading-snug font-semibold tracking-tight\">\n          {job.title}\n        </h3>\n        <div className=\"flex flex-wrap items-center gap-x-2 gap-y-1\">\n          <MetaItem icon={<FiMapPin size={11} />} label={job.location} />\n          <Dot />\n          <MetaItem icon={<FiClock size={11} />} label={job.type} />\n          <Dot />\n          <MetaItem icon={<FiDollarSign size={11} />} label={job.salaryRange} />\n        </div>\n      </div>\n\n      <button\n        onClick={() => job.onApply?.(job)}\n        className={cn(\n          \"mt-2 flex shrink-0 items-center gap-1.5 text-sm font-medium sm:mt-0\",\n          \"text-foreground\",\n          \"transition-all duration-150 hover:gap-2.5\",\n        )}\n      >\n        Apply\n        <FiArrowRight\n          size={14}\n          className=\"transition-transform duration-150 group-hover:translate-x-0.5\"\n        />\n      </button>\n    </div>\n  );\n}\n\nfunction MetaItem({ icon, label }: { icon: React.ReactNode; label: string }) {\n  return (\n    <span className=\"text-muted-foreground flex items-center gap-1 text-xs leading-none\">\n      {icon}\n      {label}\n    </span>\n  );\n}\n\nfunction Dot() {\n  return <span className=\"text-foreground text-xs\">•</span>;\n}\n\nexport default function Career4({\n  eyebrow = \"Join our HR team\",\n  heading,\n  description,\n  jobs = DEFAULT_JOBS,\n  footerLabel = \"Looking for more opportunities?\",\n  footerCTA = \"See all open roles\",\n  onFooterCTA,\n  className,\n}: Career4Props) {\n  const [locationFilter, setLocationFilter] = useState(\"\");\n  const [typeFilter, setTypeFilter] = useState(\"\");\n  const [sortBy, setSortBy] = useState(\"\");\n  const [search, setSearch] = useState(\"\");\n\n  const locations = useMemo(\n    () => [...new Set(jobs.map((j) => j.location))],\n    [jobs],\n  );\n  const types = useMemo(() => [...new Set(jobs.map((j) => j.type))], [jobs]);\n\n  const filtered = useMemo(() => {\n    let list = jobs;\n    if (locationFilter)\n      list = list.filter((j) => j.location === locationFilter);\n    if (typeFilter) list = list.filter((j) => j.type === typeFilter);\n    if (search)\n      list = list.filter((j) =>\n        j.title.toLowerCase().includes(search.toLowerCase()),\n      );\n    if (sortBy === \"Title A–Z\")\n      list = [...list].sort((a, b) => a.title.localeCompare(b.title));\n    if (sortBy === \"Title Z–A\")\n      list = [...list].sort((a, b) => b.title.localeCompare(a.title));\n    return list;\n  }, [jobs, locationFilter, typeFilter, search, sortBy]);\n\n  return (\n    <section className={cn(\"mx-auto w-full max-w-5xl px-4 py-8\", className)}>\n      <div className=\"mb-12 space-y-5 text-center\">\n        <span\n          className={cn(\n            \"inline-flex items-center gap-1.5 rounded-full px-4 py-1.5\",\n            \"text-xs font-medium tracking-wide\",\n            \"text-muted-foreground\",\n            \"bg-muted\",\n            \"border-border border\",\n          )}\n        >\n          <FiUsers size={12} />\n          {eyebrow}\n        </span>\n\n        <h2 className=\"text-foreground text-4xl leading-[1.1] font-bold tracking-tight sm:text-5xl md:text-6xl\">\n          {heading}\n        </h2>\n\n        {description && (\n          <p className=\"text-muted-foreground mx-auto max-w-md text-base leading-relaxed\">\n            {description}\n          </p>\n        )}\n      </div>\n\n      <div className=\"border-border mb-6 flex flex-col gap-4 border-b pb-6 sm:flex-row sm:items-center sm:justify-between\">\n        <div className=\"border-border divide-border flex w-full flex-col divide-y overflow-hidden rounded-lg border sm:w-auto sm:flex-row sm:divide-x sm:divide-y-0\">\n          <FilterDropdown\n            label=\"All locations\"\n            options={locations}\n            value={locationFilter}\n            onChange={setLocationFilter}\n          />\n          <FilterDropdown\n            label=\"All types\"\n            options={types}\n            value={typeFilter}\n            onChange={setTypeFilter}\n          />\n          <FilterDropdown\n            label=\"Sort by\"\n            options={[\"Title A–Z\", \"Title Z–A\"]}\n            value={sortBy}\n            onChange={setSortBy}\n          />\n        </div>\n\n        <div\n          className={cn(\n            \"flex items-center gap-2 rounded-lg px-3 py-2\",\n            \"border-border border\",\n            \"bg-muted\",\n            \"w-full transition-all focus-within:ring-2 focus-within:ring-gray-300 sm:w-52 dark:focus-within:ring-gray-700\",\n          )}\n        >\n          <FiSearch size={13} className=\"text-muted-foreground shrink-0\" />\n          <input\n            type=\"text\"\n            placeholder=\"Search roles\"\n            value={search}\n            onChange={(e) => setSearch(e.target.value)}\n            className=\"placeholder:text-muted-foreground w-full bg-transparent text-sm text-gray-700 outline-none\"\n          />\n        </div>\n      </div>\n\n      <div className=\"min-h-[180px]\">\n        {filtered.length === 0 ? (\n          <p className=\"text-muted-foreground py-16 text-center text-sm\">\n            No roles match — try adjusting your filters.\n          </p>\n        ) : (\n          filtered.map((job, i) => (\n            <JobRow key={job.id} job={job} isLast={i === filtered.length - 1} />\n          ))\n        )}\n      </div>\n\n      <div className=\"border-border mt-4 space-y-2 border-t pt-8 text-center\">\n        <p className=\"text-muted-foreground text-sm\">{footerLabel}</p>\n        <button\n          onClick={onFooterCTA}\n          className=\"text-foreground inline-flex items-center gap-1.5 text-sm font-medium transition-colors hover:text-gray-600\"\n        >\n          {footerCTA}\n          <FiArrowRight size={14} />\n        </button>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:ui",
      "target": "components/ui/career-4.tsx"
    }
  ],
  "type": "registry:ui"
}
