{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Open jobs as cards, grouped by department, or as a table.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * Open jobs as cards in two columns, grouped by department, or as a table: the title, the department, the place,\n * the type, an optional salary and an apply link. Axes: layout (grid, grouped, table), salary (show, hide),\n * tone.\n */\nimport { type ReactNode } from \"react\";\nimport { Badge, Group, List, ListItem, Stack, Text, Title } from \"../compose\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { JobCards } from \"../components/job-cards\";\nimport { MenuEntry } from \"../components/menu-entry\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { tpl } from \"../utils\";\nimport type { Job, Department, JobLabels } from \"./job-board.types\";\n\nexport type JobBoardProps = {\n  id: string;\n  title: string;\n  lead?: string;\n  jobs: Job[];\n  departments: Department[];\n  labels: JobLabels;\n  layout?: \"grid\" | \"grouped\" | \"table\";\n  salary?: \"show\" | \"hide\";\n  tone?: \"default\" | \"muted\";\n  empty?: string;\n  landmarkLabel?: string;\n};\n\nexport function JobBoard({\n  id,\n  title,\n  lead = \"\",\n  jobs,\n  departments,\n  labels,\n  layout = \"grid\",\n  salary = \"hide\",\n  tone = \"default\",\n  empty = \"\",\n  landmarkLabel,\n}: JobBoardProps) {\n  return (\n    <SectionFrame\n      id={id}\n      title={title}\n      lead={lead}\n      tone={tone}\n      measure={(((layout as string) === \"grouped\") ? \"3xl\" : \"default\")}\n      landmarkLabel={landmarkLabel}\n    >\n      {((jobs?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"briefcase\" title={empty} />\n      ) : ((layout as string) === \"grouped\") ? (\n        <Stack gap=\"8\" align=\"stretch\" data-slot=\"groups\">\n          {(departments ?? []).map((d) => (\n            <Stack key={d.id} gap=\"2\" align=\"stretch\" data-slot=\"group\">\n              <Group gap=\"4\" align=\"baseline\" justify=\"between\">\n                <Title as={3} size=\"lg\" weight=\"bold\">\n                  {d.name}\n                </Title>\n                <Text size=\"xs\" className=\"text-muted-foreground\">\n                  {tpl(labels.count, (jobs.filter((i) => !d.id || i[\"dept\"] === d.id)?.length ?? 0))}\n                </Text>\n              </Group>\n              <List tag=\"ul\" className=\"flex flex-col\">\n                {(jobs.filter((i) => !d.id || i[\"dept\"] === d.id) ?? []).map((j) => (\n                  <ListItem key={j.id}\n                    className=\"flex flex-wrap items-center justify-between gap-4 border-b border-border py-4\"\n                    data-slot=\"item\"\n                  >\n                    <Stack gap=\"0\">\n                      <MenuEntry href={j.href} className=\"font-medium\">\n                        {j.title}\n                      </MenuEntry>\n                      <Text size=\"xs\" className=\"text-muted-foreground\">\n                        {tpl(\"{0}, {1}\", j.location, j.type)}\n                      </Text>\n                    </Stack>\n                    <Badge variant=\"outline\" size=\"default\">\n                      {j.type}\n                    </Badge>\n                  </ListItem>\n                ))}\n              </List>\n            </Stack>\n          ))}\n        </Stack>\n      ) : (\n        <JobCards jobs={jobs} departments={departments} labels={labels} layout={layout} salary={salary} />\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/job-board.tsx",
      "target": "blocks/job-board.tsx"
    },
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type Job = {\n  id: string;\n  title: string;\n  dept: string;\n  location: string;\n  type: string;\n  salary: string;\n  posted: string;\n  href?: string;\n};\n\nexport type Department = {\n  id: string;\n  name: string;\n};\n\nexport type JobLabels = {\n  apply: string;\n  caption: string;\n  role: string;\n  team: string;\n  location: string;\n  type: string;\n  salary: string;\n  count: string;\n};\n",
      "path": "blocks/job-board.types.ts",
      "target": "blocks/job-board.types.ts"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "company",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "job-board",
  "registryDependencies": [
    "compose",
    "empty-state",
    "job-cards",
    "menu-entry",
    "section-frame",
    "utils"
  ],
  "runtime": "react",
  "title": "Job Board",
  "type": "registry:block"
}
