{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-customer-detail",
  "type": "registry:block",
  "title": "Customer detail",
  "description": "One customer’s record on a raised page: a header with actions, key facts, tabs over open deals and an activity timeline.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/app-shell.json",
    "https://wideset.co/r/avatar.json",
    "https://wideset.co/r/block-styles.json",
    "https://wideset.co/r/breadcrumbs.json",
    "https://wideset.co/r/button.json",
    "https://wideset.co/r/card.json",
    "https://wideset.co/r/dropdown-menu.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/status-badge.json",
    "https://wideset.co/r/table.json",
    "https://wideset.co/r/tabs.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/customer-detail/activity-timeline.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/activity-timeline.tsx",
      "content": "'use client';\n\n// TODO(custom): activity timeline; no Timeline in Wideset.\nimport {\n  type RemixiconComponentType,\n  RiArrowRightLine,\n  RiHandCoinLine,\n  RiMailLine,\n  RiPhoneLine,\n  RiStickyNoteLine,\n} from '@remixicon/react';\n\nimport { type Activity, type ActivityKind, NOW } from './data';\nimport { formatAgo, formatDateTime } from './format';\n\nconst ICON: Record<ActivityKind, RemixiconComponentType> = {\n  stage: RiArrowRightLine,\n  call: RiPhoneLine,\n  email: RiMailLine,\n  note: RiStickyNoteLine,\n  deal: RiHandCoinLine,\n};\n\n/**\n * What happened with the customer, newest first, on one line of marks: each mark says what kind\n * of event it was, the line names who did it to what, and what was said or changed reads under it.\n */\nexport function ActivityTimeline({ items }: { items: Activity[] }) {\n  return (\n    <ol className=\"flex flex-col\">\n      {items.map((item, index) => {\n        const Icon = ICON[item.kind];\n        const last = index === items.length - 1;\n        return (\n          <li key={item.id} className=\"gap-ws-7 relative flex\">\n            {last ? null : (\n              <span\n                aria-hidden=\"true\"\n                className=\"border-ws-static-base top-ws-15 bottom-ws-3 left-ws-9 absolute border-l\"\n              />\n            )}\n            <span\n              aria-hidden=\"true\"\n              className=\"size-ws-14 rounded-ws-control-full border-ws-static-base bg-ws-static-container text-ws-static-subtle flex shrink-0 items-center justify-center border\"\n            >\n              <Icon className=\"size-ws-8\" />\n            </span>\n            <div className={last ? 'min-w-0 flex-1' : 'pb-ws-12 min-w-0 flex-1'}>\n              <div className=\"gap-ws-9 pt-ws-4 flex items-baseline justify-between\">\n                <p className=\"typography-body-md text-ws-static-subtle min-w-0\">\n                  <span className=\"text-ws-static-strong font-ws-medium\">{item.actor.name}</span>{' '}\n                  {item.action}\n                  {item.subject ? (\n                    <>\n                      {' '}\n                      <span className=\"text-ws-static-strong font-ws-medium\">{item.subject}</span>\n                    </>\n                  ) : null}\n                </p>\n                <time\n                  dateTime={item.at}\n                  title={formatDateTime(item.at)}\n                  className=\"typography-caption-md text-ws-static-subtle shrink-0 tabular-nums\"\n                >\n                  {formatAgo(item.at, NOW)}\n                </time>\n              </div>\n              {item.detail ? (\n                <p className=\"mt-ws-3 typography-body-md text-ws-static-base max-w-[40rem]\">\n                  {item.detail}\n                </p>\n              ) : null}\n            </div>\n          </li>\n        );\n      })}\n    </ol>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/brand-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/brand-mark.tsx",
      "content": "'use client';\n\nimport { cn } from '@/lib/wideset/utils';\n\nconst TILE =\n  'M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0C23.5425 0 27.3137 0 29.6569 2.34315C32 4.68629 32 8.45753 32 16C32 23.5425 32 27.3137 29.6569 29.6569C27.3137 32 23.5425 32 16 32C8.45753 32 4.68629 32 2.34315 29.6569C0 27.3137 0 23.5425 0 16Z';\n\n/**\n * Orbit's mark: a planet and its ring on the inverse tile, so it inverts in dark mode. It takes\n * the size of its place (32px in a sidebar, 36px in a larger switcher). Decorative beside the\n * product's name; give it a `label` when it stands alone.\n */\nexport function BrandMark({ className, label }: { className?: string; label?: string }) {\n  return (\n    <svg\n      viewBox=\"0 0 32 32\"\n      role={label ? 'img' : undefined}\n      aria-label={label}\n      aria-hidden={label ? undefined : true}\n      className={cn('size-ws-14 shrink-0', className)}\n    >\n      <path d={TILE} className=\"fill-(--ws-static-fill-inverse-background)\" />\n      <ellipse\n        cx=\"16\"\n        cy=\"16\"\n        rx=\"10.5\"\n        ry=\"4\"\n        transform=\"rotate(-28 16 16)\"\n        strokeWidth=\"1.75\"\n        className=\"fill-none stroke-(--ws-static-text-inverse-strong)\"\n      />\n      <circle cx=\"16\" cy=\"16\" r=\"4.75\" className=\"fill-(--ws-static-text-inverse-strong)\" />\n    </svg>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/contacts-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/contacts-list.tsx",
      "content": "'use client';\n\n// TODO(custom): non-interactive person row; ListItem always looks clickable.\n\nimport type { Contact } from './data';\nimport { PersonAvatar } from './person-avatar';\n\n/** The people at the customer: who they are first, their role and address quieter under it. */\nexport function ContactsList({ contacts }: { contacts: Contact[] }) {\n  return (\n    <ul className=\"gap-ws-9 flex flex-col\">\n      {contacts.map((contact) => (\n        <li key={contact.email} className=\"gap-ws-7 flex items-center\">\n          <PersonAvatar name={contact.name} initials={contact.initials} color={contact.color} />\n          <div className=\"flex min-w-0 flex-col\">\n            <span className=\"typography-label-strong-sm text-ws-static-strong truncate\">\n              {contact.name}\n            </span>\n            <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n              {contact.role} · {contact.email}\n            </span>\n          </div>\n        </li>\n      ))}\n    </ul>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/data.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBarChartBoxLine,\n  RiBuilding2Fill,\n  RiBuilding2Line,\n  RiContactsBook3Line,\n  RiHandCoinLine,\n  RiHome5Line,\n  RiInbox2Line,\n  RiLineChartLine,\n  RiQuestionLine,\n  RiSettingsLine,\n  RiTaskLine,\n} from '@remixicon/react';\nimport type { AvatarColor } from '@/components/ui/wideset/avatar/Avatar.colors';\n\n/*\n  Orbit, a customer and revenue platform, in the Lumen Studio workspace. The record is one\n  customer, Lanetrack; every figure on the page comes from the deals below: the two won deals make\n  the current €64,800 a year (€5,400 a month, 120 seats at €45), the three open ones the pipeline.\n*/\n\n/** \"Now\" for the relative times in the activity; the sample is frozen at this moment. */\nexport const NOW = '2026-11-10T15:00:00Z';\n\nexport const workspace = { name: 'Lumen Studio', plan: 'Growth plan' };\n\nexport type Person = { name: string; initials: string; color: AvatarColor };\n\nconst maya: Person = { name: 'Maya Chen', initials: 'MC', color: 'teal' };\nconst priya: Person = { name: 'Priya Nair', initials: 'PN', color: 'purple' };\nconst tomas: Person = { name: 'Tomás Ruiz', initials: 'TR', color: 'orange' };\n\n/** The signed-in user: the customer's owner. */\nexport const account = { ...maya, email: 'maya@lumenstudio.com' };\n\nexport type NavLink = {\n  id: string;\n  label: string;\n  icon: RemixiconComponentType;\n  /** The icon while the page is open (a line icon swaps for its fill). */\n  activeIcon?: RemixiconComponentType;\n  /** A count that stays visible on the row. */\n  count?: number;\n};\n\nexport const mainLinks: NavLink[] = [\n  { id: 'home', label: 'Home', icon: RiHome5Line },\n  { id: 'inbox', label: 'Inbox', icon: RiInbox2Line, count: 4 },\n  { id: 'tasks', label: 'My tasks', icon: RiTaskLine, count: 7 },\n];\n\nexport const recordLinks: NavLink[] = [\n  { id: 'customers', label: 'Customers', icon: RiBuilding2Line, activeIcon: RiBuilding2Fill },\n  { id: 'contacts', label: 'Contacts', icon: RiContactsBook3Line },\n  { id: 'deals', label: 'Deals', icon: RiHandCoinLine },\n];\n\nexport const insightLinks: NavLink[] = [\n  { id: 'reports', label: 'Reports', icon: RiBarChartBoxLine },\n  { id: 'forecast', label: 'Forecast', icon: RiLineChartLine },\n];\n\nexport const footerLinks: NavLink[] = [\n  { id: 'settings', label: 'Settings', icon: RiSettingsLine },\n  { id: 'help', label: 'Help', icon: RiQuestionLine },\n];\n\nexport type Contact = Person & { role: string; email: string };\n\nconst pieter: Contact = {\n  name: 'Pieter de Vries',\n  initials: 'PV',\n  color: 'blue',\n  role: 'Head of Operations',\n  email: 'pieter@lanetrack.io',\n};\nconst sanne: Contact = {\n  name: 'Sanne Bakker',\n  initials: 'SB',\n  color: 'pink',\n  role: 'CFO',\n  email: 'sanne@lanetrack.io',\n};\nconst jonas: Contact = {\n  name: 'Jonas Meier',\n  initials: 'JM',\n  color: 'lime',\n  role: 'IT Lead',\n  email: 'jonas@lanetrack.io',\n};\nconst aylin: Contact = {\n  name: 'Aylin Kaya',\n  initials: 'AK',\n  color: 'yellow',\n  role: 'Dispatch Manager',\n  email: 'aylin@lanetrack.io',\n};\n\nexport type DealStage = 'Discovery' | 'Proposal' | 'Negotiation' | 'Won' | 'Lost';\n\nexport type Deal = {\n  id: string;\n  name: string;\n  /** What kind of deal, under its name. */\n  kind: string;\n  stage: DealStage;\n  owner: Person;\n  /** ISO day it closes (open) or closed (won, lost). */\n  closeDate: string;\n  /** Value a year, in euros. */\n  value: number;\n};\n\nexport const deals: Deal[] = [\n  {\n    id: 'sso',\n    name: 'SSO and audit log',\n    kind: 'Add-on',\n    stage: 'Negotiation',\n    owner: maya,\n    closeDate: '2026-11-27',\n    value: 9_600,\n  },\n  {\n    id: 'seats-160',\n    name: 'Q4 seat expansion',\n    kind: 'Expansion, 40 seats',\n    stage: 'Proposal',\n    owner: maya,\n    closeDate: '2026-12-11',\n    value: 21_600,\n  },\n  {\n    id: 'analytics',\n    name: 'Advanced analytics',\n    kind: 'Add-on',\n    stage: 'Discovery',\n    owner: priya,\n    closeDate: '2027-02-26',\n    value: 14_400,\n  },\n  {\n    id: 'seats-120',\n    name: '2025 seat expansion',\n    kind: 'Expansion, 40 seats',\n    stage: 'Won',\n    owner: maya,\n    closeDate: '2025-09-30',\n    value: 21_600,\n  },\n  {\n    id: 'automation',\n    name: 'Workflow automation',\n    kind: 'Add-on',\n    stage: 'Lost',\n    owner: tomas,\n    closeDate: '2025-06-18',\n    value: 7_200,\n  },\n  {\n    id: 'scale',\n    name: 'Scale plan, 80 seats',\n    kind: 'New business',\n    stage: 'Won',\n    owner: maya,\n    closeDate: '2025-03-03',\n    value: 43_200,\n  },\n];\n\nexport const openDeals = deals.filter(({ stage }) => stage !== 'Won' && stage !== 'Lost');\n\n/** The customer the page is about. */\nexport const customer = {\n  name: 'Lanetrack',\n  initials: 'LT',\n  domain: 'lanetrack.io',\n  status: 'Active',\n  owner: maya,\n  plan: 'Scale, billed yearly',\n  /** Monthly recurring revenue, in euros: 120 seats at €45. */\n  mrr: 5_400,\n  customerSince: '2025-03-03',\n  seats: { used: 112, licensed: 120 },\n  industry: 'Logistics software',\n  employees: 120,\n  location: 'Rotterdam, Netherlands',\n  /** 0–100, from usage, support load and engagement. */\n  health: { score: 82, label: 'Good', previous: 76 },\n  contacts: [pieter, sanne, jonas, aylin],\n};\n\nexport type ActivityKind = 'stage' | 'call' | 'email' | 'note' | 'deal';\n\nexport type Activity = {\n  id: string;\n  kind: ActivityKind;\n  /** Who did it. */\n  actor: Person;\n  /** What they did, read after the actor's name (\"logged a call with\"). */\n  action: string;\n  /** What or whom it was done to, read after the action. */\n  subject?: string;\n  /** What it said or changed, under the line: the email, the call notes, the note, the stages. */\n  detail?: string;\n  /** ISO date and time. */\n  at: string;\n};\n\nexport const activity: Activity[] = [\n  {\n    id: 'stage-proposal',\n    kind: 'stage',\n    actor: maya,\n    action: 'moved',\n    subject: 'Q4 seat expansion',\n    detail: 'Discovery → Proposal',\n    at: '2026-11-10T13:05:00Z',\n  },\n  {\n    id: 'call-quote',\n    kind: 'call',\n    actor: maya,\n    action: 'logged a call with',\n    subject: pieter.name,\n    detail:\n      'Walked through the 160-seat quote. Pieter needs Sanne’s sign-off before 5 Dec; the revised order form goes out on Friday.',\n    at: '2026-11-09T16:20:00Z',\n  },\n  {\n    id: 'email-sso',\n    kind: 'email',\n    actor: jonas,\n    action: 'replied to',\n    subject: maya.name,\n    detail:\n      'Our SAML setup passed the security review. I’ll send the completed questionnaire this week.',\n    at: '2026-11-07T09:42:00Z',\n  },\n  {\n    id: 'note-qbr',\n    kind: 'note',\n    actor: priya,\n    action: 'added a note',\n    detail:\n      'QBR done. Dispatch is at 112 of 120 seats, and the Antwerp and Hamburg depots go live in January: expect 40 more users.',\n    at: '2026-11-05T11:10:00Z',\n  },\n  {\n    id: 'email-pricing',\n    kind: 'email',\n    actor: maya,\n    action: 'emailed',\n    subject: sanne.name,\n    detail: 'Revised pricing for 160 seats, with the SSO add-on on the same yearly invoice.',\n    at: '2026-11-03T08:30:00Z',\n  },\n  {\n    id: 'deal-analytics',\n    kind: 'deal',\n    actor: priya,\n    action: 'created the deal',\n    subject: 'Advanced analytics',\n    at: '2026-10-29T14:00:00Z',\n  },\n  {\n    id: 'call-sso-demo',\n    kind: 'call',\n    actor: tomas,\n    action: 'logged a call with',\n    subject: jonas.name,\n    detail:\n      'SSO demo with Okta. Jonas wants audit log exports in their SIEM; confirmed they are part of the add-on.',\n    at: '2026-10-22T13:00:00Z',\n  },\n  {\n    id: 'note-invoice',\n    kind: 'note',\n    actor: maya,\n    action: 'added a note',\n    detail:\n      'Sanne wants one invoice a year for the plan and every add-on, in euros, on their PO number.',\n    at: '2026-10-20T10:15:00Z',\n  },\n];\n"
    },
    {
      "path": "src/blocks/customer-detail/deals-table.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/deals-table.tsx",
      "content": "'use client';\n\n// TODO(custom): whole-row link done with a stretched <a>; Table has no row link.\nimport { StatusBadge } from '@/components/ui/wideset/status-badge/StatusBadge';\nimport { type StatusBadgeProps } from '@/components/ui/wideset/status-badge/StatusBadge.types';\nimport { Table } from '@/components/ui/wideset/table/Table';\n\nimport type { Deal, DealStage } from './data';\nimport { formatDay, formatEuro } from './format';\n\n/** A stage in the colour of what it says about the deal, the same in every block. */\nconst STAGE_COLOR: Record<DealStage, StatusBadgeProps['color']> = {\n  Discovery: 'neutral',\n  Proposal: 'info',\n  Negotiation: 'notice',\n  Won: 'positive',\n  Lost: 'negative',\n};\n\n/**\n * The table sits in a card, edge to edge: the outer cells are inset like the card's title, and\n * the last row leaves its line to the card's border.\n */\nconst IN_CARD =\n  '[&_tr>*:first-child]:pl-ws-11 [&_tr>*:last-child]:pr-ws-11 [&_tbody>tr:last-child>*]:border-b-0';\n\n/** Deals with this customer: one row per deal, opened from anywhere on the row. */\nexport function DealsTable({ deals, label }: { deals: Deal[]; label: string }) {\n  return (\n    // Auto layout: the short columns keep to one line and their width, the deal takes the rest.\n    <Table size=\"md\" interactive aria-label={label} className={IN_CARD}>\n      <Table.Head>\n        <Table.Row>\n          <Table.Header className=\"w-full\">Deal</Table.Header>\n          <Table.Header>Stage</Table.Header>\n          <Table.Header className=\"whitespace-nowrap\">Close date</Table.Header>\n          <Table.Header align=\"right\">ARR</Table.Header>\n        </Table.Row>\n      </Table.Head>\n      <Table.Body>\n        {deals.map((deal) => (\n          // The name's link stretches over the whole row: one target, the hover on every cell.\n          <Table.Row key={deal.id} className=\"relative\">\n            <Table.Cell>\n              <a\n                href={`#deal-${deal.id}`}\n                className=\"text-ws-static-strong focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default after:inset-ws-0 after:absolute\"\n              >\n                {deal.name}\n              </a>\n              <Table.CellDescription>\n                {deal.kind} · {deal.owner.name}\n              </Table.CellDescription>\n            </Table.Cell>\n            <Table.Cell>\n              <StatusBadge size=\"sm\" color={STAGE_COLOR[deal.stage]}>\n                {deal.stage}\n              </StatusBadge>\n            </Table.Cell>\n            <Table.Cell className=\"whitespace-nowrap tabular-nums\">\n              {formatDay(deal.closeDate)}\n            </Table.Cell>\n            <Table.Cell align=\"right\">\n              <span className=\"typography-number-sm text-ws-static-strong tabular-nums\">\n                {formatEuro(deal.value)}\n              </span>\n            </Table.Cell>\n          </Table.Row>\n        ))}\n      </Table.Body>\n    </Table>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/facts-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/facts-list.tsx",
      "content": "'use client';\n\n// TODO(custom): key-value facts list; no DescriptionList in Wideset.\nimport type { ReactNode } from 'react';\n\nimport { customer } from './data';\nimport { formatCount, formatDay, formatEuro } from './format';\nimport { PersonAvatar } from './person-avatar';\n\nconst FACTS: { label: string; value: ReactNode }[] = [\n  {\n    label: 'Owner',\n    value: (\n      <span className=\"gap-ws-5 flex items-center\">\n        <PersonAvatar\n          size=\"xs\"\n          name={customer.owner.name}\n          initials={customer.owner.initials}\n          color={customer.owner.color}\n        />\n        {customer.owner.name}\n      </span>\n    ),\n  },\n  { label: 'Plan', value: customer.plan },\n  { label: 'MRR', value: <span className=\"tabular-nums\">{formatEuro(customer.mrr)}</span> },\n  { label: 'Customer since', value: formatDay(customer.customerSince) },\n  {\n    label: 'Seats',\n    value: (\n      <span className=\"tabular-nums\">\n        {customer.seats.used} of {customer.seats.licensed} in use\n      </span>\n    ),\n  },\n  { label: 'Domain', value: customer.domain },\n  { label: 'Industry', value: customer.industry },\n  { label: 'Employees', value: formatCount(customer.employees) },\n  { label: 'Location', value: customer.location },\n];\n\n/** The record's facts as label and value: the label names, the value is what is read. */\nexport function FactsList() {\n  return (\n    <dl className=\"gap-x-ws-9 gap-y-ws-7 grid grid-cols-[7rem_minmax(0,1fr)]\">\n      {FACTS.map(({ label, value }) => (\n        <div key={label} className=\"col-span-2 grid grid-cols-subgrid items-center\">\n          <dt className=\"typography-label-sm text-ws-static-subtle\">{label}</dt>\n          <dd className=\"typography-body-md text-ws-static-base min-w-0 truncate\">{value}</dd>\n        </div>\n      ))}\n    </dl>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/format.ts",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/format.ts",
      "content": "// One locale for the whole screen; swap it for the user's.\nconst LOCALE = 'en-GB';\n\nconst euro = new Intl.NumberFormat(LOCALE, {\n  style: 'currency',\n  currency: 'EUR',\n  maximumFractionDigits: 0,\n});\nconst count = new Intl.NumberFormat(LOCALE);\nconst percent = new Intl.NumberFormat(LOCALE, { style: 'percent' });\n// Days are calendar days (`2026-11-27`), parsed as UTC midnight: format them in UTC too.\nconst day = new Intl.DateTimeFormat(LOCALE, {\n  day: 'numeric',\n  month: 'short',\n  year: 'numeric',\n  timeZone: 'UTC',\n});\nconst dayThisYear = new Intl.DateTimeFormat(LOCALE, {\n  day: 'numeric',\n  month: 'short',\n  timeZone: 'UTC',\n});\nconst dateTime = new Intl.DateTimeFormat(LOCALE, {\n  dateStyle: 'medium',\n  timeStyle: 'short',\n  timeZone: 'UTC',\n});\nconst relative = new Intl.RelativeTimeFormat(LOCALE, { numeric: 'auto' });\n\nconst HOUR = 3_600_000;\nconst DAY = 24 * HOUR;\n\nexport const formatEuro = (value: number) => euro.format(value);\nexport const formatCount = (value: number) => count.format(value);\nexport const formatPercent = (value: number) => percent.format(value);\nexport const formatDay = (iso: string) => day.format(new Date(iso));\n/** The full date and time, for the `title` of a relative time. */\nexport const formatDateTime = (iso: string) => dateTime.format(new Date(iso));\n\n/**\n * How long ago, the way a timeline reads it: hours today, days for the last few days\n * (\"Yesterday\", \"3 days ago\"), then the date (with the year once it is another year's).\n */\nexport function formatAgo(iso: string, now: string) {\n  const days = (Date.parse(now.slice(0, 10)) - Date.parse(iso.slice(0, 10))) / DAY;\n  const date = new Date(iso);\n  const text =\n    days === 0\n      ? relative.format(-Math.max(1, Math.round((Date.parse(now) - date.getTime()) / HOUR)), 'hour')\n      : days < 4\n        ? relative.format(-days, 'day')\n        : (date.getUTCFullYear() === new Date(now).getUTCFullYear() ? dayThisYear : day).format(\n            date,\n          );\n  return text.charAt(0).toUpperCase() + text.slice(1);\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/index.tsx",
      "content": "'use client';\n\nimport '@/styles/wideset-blocks.css';\n\n// TODO(custom): local Section heading (title + one xs action) and a titled Card panel composed by hand.\nimport { RiAddLine, RiBuilding2Line } from '@remixicon/react';\nimport { AppShell } from '@/components/ui/wideset/app-shell/AppShell';\nimport { Breadcrumbs } from '@/components/ui/wideset/breadcrumbs/Breadcrumbs';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { Card } from '@/components/ui/wideset/card/Card';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { Tabs } from '@/components/ui/wideset/tabs/Tabs';\nimport { type ReactNode, useId, useState } from 'react';\n\nimport { ActivityTimeline } from './activity-timeline';\nimport { ContactsList } from './contacts-list';\nimport { activity, customer, deals, openDeals } from './data';\nimport { DealsTable } from './deals-table';\nimport { FactsList } from './facts-list';\nimport { KeyFigures } from './key-figures';\nimport { RecordHeader } from './record-header';\nimport { CustomerSidebar } from './sidebar';\n\nconst notes = activity.filter(({ kind }) => kind === 'note');\n\nconst TABS = [\n  { value: 'overview', label: 'Overview' },\n  { value: 'deals', label: 'Deals' },\n  { value: 'activity', label: 'Activity' },\n  { value: 'notes', label: 'Notes' },\n];\n\n/** One column of the page: the header and the body share its edges. */\nconst COLUMN = 'px-ws-14 mx-auto w-full max-w-[80rem]';\n\n/** A titled part of the page; its one action (xs, in the heading row) is optional. */\nfunction Section({\n  title,\n  action,\n  children,\n}: {\n  title: ReactNode;\n  action?: ReactNode;\n  children: ReactNode;\n}) {\n  const id = useId();\n  return (\n    <section aria-labelledby={id} className=\"gap-ws-9 flex flex-col\">\n      <div className=\"gap-ws-5 flex items-center justify-between\">\n        <h2 id={id} className=\"typography-label-strong-md text-ws-static-strong\">\n          {title}\n        </h2>\n        {action}\n      </div>\n      {children}\n    </section>\n  );\n}\n\n/**\n * A part of the page to work with, in a bordered card: its title and one optional action in the\n * header. Without a title (on a tab, which names it already) the card has no header. A `flush`\n * card holds a table, which runs edge to edge and pads its own cells.\n */\nfunction Panel({\n  title,\n  label,\n  action,\n  flush,\n  children,\n}: {\n  title?: ReactNode;\n  /** The region's name when the card has no title. */\n  label?: string;\n  action?: ReactNode;\n  flush?: boolean;\n  children: ReactNode;\n}) {\n  const id = useId();\n  return (\n    <Card\n      role=\"region\"\n      aria-labelledby={title ? id : undefined}\n      aria-label={title ? undefined : label}\n    >\n      {title ? (\n        <Card.Header>\n          <div className=\"gap-ws-5 flex items-center justify-between\">\n            <h2 id={id} className=\"typography-label-strong-md text-ws-static-strong\">\n              {title}\n            </h2>\n            {action}\n          </div>\n        </Card.Header>\n      ) : null}\n      {/* A table goes straight in the card: Card.Content's scrollbar gutter would stop its lines\n          short. Anything else keeps the content's padding, with the gutter given back. */}\n      {flush ? children : <Card.Content contentClassName=\"pr-ws-6\">{children}</Card.Content>}\n    </Card>\n  );\n}\n\n/**\n * Customer detail (Inset direction): one customer's record on the raised page beside the\n * workspace sidebar. The header says who they are and what to do next; the tabs hold the work,\n * each part of it in a card (the key figures, the open deals, the recent activity), and the side\n * column the facts and the people, quieter on the white without a box, the same on every tab.\n */\nexport default function CustomerDetail() {\n  const [tab, setTab] = useState('overview');\n\n  return (\n    <AppShell className=\"ws-block-utility\" direction=\"inset\">\n      <CustomerSidebar />\n      <AppShell.Main>\n        {/* The bar belongs to the surround: it runs edge to edge, the crumbs 20px from its edge. */}\n        <div className=\"h-ws-18 border-ws-static-base flex shrink-0 items-center border-b\">\n          <div className=\"px-ws-11 w-full\">\n            <Breadcrumbs separator=\"arrow\">\n              <Breadcrumbs.Item asChild>\n                <a href=\"#customers\">\n                  <RiBuilding2Line aria-hidden=\"true\" className=\"size-ws-9\" />\n                  Customers\n                </a>\n              </Breadcrumbs.Item>\n              <Breadcrumbs.Item>{customer.name}</Breadcrumbs.Item>\n            </Breadcrumbs>\n          </div>\n        </div>\n\n        {/* The page scrolls inside the card, so the card's corners stay put. */}\n        <div className=\"ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n          <div className={`${COLUMN} gap-ws-12 pt-ws-14 pb-ws-16 flex flex-col`}>\n            <RecordHeader />\n\n            <Tabs value={tab} onValueChange={setTab}>\n              <Tabs.List aria-label=\"Customer sections\" className=\"w-full\">\n                {TABS.map(({ value, label }) => (\n                  <Tabs.Item key={value} value={value}>\n                    <Tabs.Label>{label}</Tabs.Label>\n                  </Tabs.Item>\n                ))}\n              </Tabs.List>\n\n              <div className=\"gap-ws-16 pt-ws-12 grid grid-cols-1 items-start lg:grid-cols-[minmax(0,1fr)_18rem]\">\n                <div className=\"min-w-0\">\n                  <Tabs.Content value=\"overview\" className=\"gap-ws-12 flex flex-col\">\n                    <KeyFigures />\n                    <Panel title=\"Open deals\" flush>\n                      <DealsTable deals={openDeals} label=\"Open deals\" />\n                    </Panel>\n                    <Panel\n                      title=\"Recent activity\"\n                      action={\n                        <Button\n                          variant=\"secondary\"\n                          preset=\"ghost\"\n                          size=\"xs\"\n                          onClick={() => setTab('activity')}\n                          // The button is taller than the title's line: it keeps the header as\n                          // tall as the other cards'.\n                          className=\"-my-ws-2\"\n                        >\n                          View all\n                        </Button>\n                      }\n                    >\n                      <ActivityTimeline items={activity.slice(0, 5)} />\n                    </Panel>\n                  </Tabs.Content>\n                  <Tabs.Content value=\"deals\">\n                    <Panel label=\"All deals\" flush>\n                      <DealsTable deals={deals} label=\"All deals\" />\n                    </Panel>\n                  </Tabs.Content>\n                  <Tabs.Content value=\"activity\">\n                    <Panel label=\"All activity\">\n                      <ActivityTimeline items={activity} />\n                    </Panel>\n                  </Tabs.Content>\n                  <Tabs.Content value=\"notes\">\n                    <Panel label=\"Notes\">\n                      <ActivityTimeline items={notes} />\n                    </Panel>\n                  </Tabs.Content>\n                </div>\n\n                {/* Its first title stands on the line of the first text in the cards beside it. */}\n                <aside\n                  aria-label=\"About the customer\"\n                  className=\"gap-ws-16 lg:pt-ws-11 flex flex-col\"\n                >\n                  <Section title=\"Details\">\n                    <FactsList />\n                  </Section>\n                  <Section\n                    title=\"Contacts\"\n                    action={\n                      <IconButton\n                        icon={RiAddLine}\n                        variant=\"secondary\"\n                        preset=\"ghost\"\n                        size=\"xs\"\n                        aria-label=\"Add contact\"\n                      />\n                    }\n                  >\n                    <ContactsList contacts={customer.contacts} />\n                  </Section>\n                </aside>\n              </div>\n            </Tabs>\n          </div>\n        </div>\n      </AppShell.Main>\n    </AppShell>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/key-figures.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/key-figures.tsx",
      "content": "'use client';\n\n// TODO(custom): key figure card (label, figure, one line of context) in a Card; no KpiCard / stat component in Wideset.\nimport { Card } from '@/components/ui/wideset/card/Card';\n\nimport { customer, openDeals } from './data';\nimport { formatCount, formatEuro, formatPercent } from './format';\n\nconst pipeline = openDeals.reduce((total, deal) => total + deal.value, 0);\nconst { seats, health } = customer;\n\nconst FIGURES = [\n  {\n    label: 'MRR',\n    value: formatEuro(customer.mrr),\n    note: `${formatEuro(customer.mrr * 12)} ARR`,\n  },\n  {\n    label: 'Open pipeline',\n    value: formatEuro(pipeline),\n    note: `${openDeals.length} deals`,\n  },\n  {\n    label: 'Health',\n    value: formatCount(health.score),\n    note: `${health.label}, up from ${health.previous}`,\n  },\n  {\n    label: 'Seats used',\n    value: formatCount(seats.used),\n    note: `${formatPercent(seats.used / seats.licensed)} of ${seats.licensed} licensed`,\n  },\n];\n\n/**\n * The customer in four figures, each in its own card: label, figure and one line of context. The\n * cards make the row a thing to read at a glance; no icons and no colour, so the record's name\n * stays the loudest thing on the page.\n */\nexport function KeyFigures() {\n  return (\n    <div className=\"gap-ws-9 grid grid-cols-2 md:grid-cols-4\">\n      {FIGURES.map(({ label, value, note }) => (\n        <Card key={label}>\n          {/* Card.Content keeps 10px free on the right for a scrollbar: the padding gives it back. */}\n          <Card.Content contentClassName=\"pr-ws-6\">\n            <dl className=\"gap-ws-3 flex flex-col\">\n              <dt className=\"typography-label-sm text-ws-static-subtle\">{label}</dt>\n              <dd className=\"typography-number-strong-lg text-ws-static-strong tabular-nums\">\n                {value}\n              </dd>\n              <dd className=\"typography-caption-md text-ws-static-subtle truncate tabular-nums\">\n                {note}\n              </dd>\n            </dl>\n          </Card.Content>\n        </Card>\n      ))}\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/people.assets.ts",
      "content": "// Portraits of the sample people as small JPEG data URLs (a block ships only .ts and .tsx).\n// Exported from the Wideset Core Figma file by people.cjs: do not edit by hand.\n\n/** A person’s photo by name. People who are not here show their initials. */\nexport const PHOTOS: Record<string, string | undefined> = {\n  'Maya Chen':\n    'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAQDAwQDAwQEBAQFBQQFBwsHBwYGBw4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IP5VXfu1Ts2cvaZgpUtPDiE71MPaVZ0uxW7g2kBxk7q/NJ/wf612tAagb1RpWy3dpQUmXCbWceOOP1zW5qGL9o2yYwBkrQQPXHD61xdgFms6PuNvn0XdGc1bTJOx3+XVf//Z',\n};\n"
    },
    {
      "path": "src/blocks/customer-detail/person-avatar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/person-avatar.tsx",
      "content": "'use client';\n\nimport type { AvatarColor } from '@/components/ui/wideset/avatar/Avatar.colors';\nimport type { AvatarProps } from '@/components/ui/wideset/avatar/Avatar.types';\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\n\nimport { PHOTOS } from './people.assets';\n\ntype PersonAvatarProps = Pick<\n  AvatarProps,\n  'size' | 'status' | 'className' | 'title' | 'aria-hidden'\n> & {\n  /** The person's full name: the key their photo is stored under. */\n  name: string;\n  initials: string;\n  /** The colour of the initials. A photo takes none. */\n  color?: AvatarColor;\n  /** Empty beside the person's name (the default); their name when the avatar stands alone. */\n  alt?: string;\n};\n\n/**\n * A person's avatar: their photo when there is one, their initials otherwise, which is also what\n * shows if the photo fails to load. The one place the block makes that choice, so a list that\n * mixes photos and initials is still drawn the same way everywhere.\n */\nexport function PersonAvatar({ name, initials, color, alt = '', ...avatar }: PersonAvatarProps) {\n  const photo = PHOTOS[name];\n  return photo ? (\n    <Avatar src={photo} alt={alt} initials={initials} {...avatar} />\n  ) : (\n    <Avatar initials={initials} color={color} {...avatar} />\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/record-header.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/record-header.tsx",
      "content": "'use client';\n\nimport {\n  type RemixiconComponentType,\n  RiAddLine,\n  RiDeleteBinLine,\n  RiEditLine,\n  RiLinkM,\n  RiMailLine,\n  RiMoreFill,\n  RiPhoneLine,\n} from '@remixicon/react';\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { StatusBadge } from '@/components/ui/wideset/status-badge/StatusBadge';\n\nimport { customer } from './data';\n\nconst MENU: { label: string; icon: RemixiconComponentType }[] = [\n  { label: 'Edit details', icon: RiEditLine },\n  { label: 'Log a call', icon: RiPhoneLine },\n  { label: 'Copy link', icon: RiLinkM },\n];\n\n/** The record's header: who the customer is, then what to do with them, primary last. */\nexport function RecordHeader() {\n  return (\n    <header className=\"gap-ws-12 flex flex-wrap items-center justify-between\">\n      <div className=\"gap-ws-9 flex min-w-0 items-center\">\n        <Avatar\n          size=\"xl\"\n          shape=\"square\"\n          initials={customer.initials}\n          color=\"indigo\"\n          aria-hidden=\"true\"\n        />\n        <div className=\"gap-ws-2 flex min-w-0 flex-col\">\n          <div className=\"gap-ws-7 flex items-center\">\n            <h1 className=\"typography-title-sm text-ws-static-strong\">{customer.name}</h1>\n            {/* Active is a healthy state, so it takes the positive colour. */}\n            <StatusBadge size=\"lg\" color=\"positive\">\n              {customer.status}\n            </StatusBadge>\n          </div>\n          <p className=\"typography-body-md text-ws-static-subtle\">{customer.domain}</p>\n        </div>\n      </div>\n\n      <div className=\"gap-ws-5 flex items-center\">\n        <DropdownMenu>\n          <DropdownMenu.Trigger asChild>\n            <IconButton\n              icon={RiMoreFill}\n              variant=\"secondary\"\n              preset=\"border\"\n              size=\"sm\"\n              aria-label=\"More actions\"\n            />\n          </DropdownMenu.Trigger>\n          <DropdownMenu.Content align=\"end\" className=\"ws-block-utility w-[14rem]\">\n            {MENU.map(({ label, icon: Icon }) => (\n              <DropdownMenu.Item key={label}>\n                <ListItem.Prefix>\n                  <Icon className=\"size-ws-9\" />\n                </ListItem.Prefix>\n                <ListItem.Content>\n                  <ListItem.Label>{label}</ListItem.Label>\n                </ListItem.Content>\n              </DropdownMenu.Item>\n            ))}\n            <DropdownMenu.Separator />\n            <DropdownMenu.Item variant=\"danger\">\n              <ListItem.Prefix>\n                <RiDeleteBinLine className=\"size-ws-9\" />\n              </ListItem.Prefix>\n              <ListItem.Content>\n                <ListItem.Label>Delete customer</ListItem.Label>\n              </ListItem.Content>\n            </DropdownMenu.Item>\n          </DropdownMenu.Content>\n        </DropdownMenu>\n        <Button variant=\"secondary\" preset=\"border\" size=\"sm\">\n          <Button.Icon icon={RiMailLine} />\n          Email\n        </Button>\n        <Button size=\"sm\">\n          <Button.Icon icon={RiAddLine} />\n          New deal\n        </Button>\n      </div>\n    </header>\n  );\n}\n"
    },
    {
      "path": "src/blocks/customer-detail/sidebar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/customer-detail/sidebar.tsx",
      "content": "'use client';\n\n// TODO(custom): workspace switcher and account menu are composed by hand.\nimport { RiAddLine, RiArrowDownSLine, RiLogoutBoxRLine, RiSearchLine } from '@remixicon/react';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { Sidebar } from '@/components/ui/wideset/sidebar/Sidebar';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { useState } from 'react';\n\nimport { BrandMark } from './brand-mark';\nimport {\n  account,\n  footerLinks,\n  insightLinks,\n  mainLinks,\n  type NavLink,\n  recordLinks,\n  workspace,\n} from './data';\nimport { PersonAvatar } from './person-avatar';\n\n/** The workspace sidebar on the grey frame: switcher, search, pages and the signed-in account. */\nexport function CustomerSidebar() {\n  const [active, setActive] = useState('customers');\n\n  const link = ({ id, label, icon, activeIcon, count }: NavLink) => (\n    <Sidebar.Item\n      key={id}\n      href={`#${id}`}\n      icon={active === id ? (activeIcon ?? icon) : icon}\n      label={label}\n      active={active === id}\n      suffix={count}\n      onClick={() => setActive(id)}\n    />\n  );\n\n  return (\n    <Sidebar>\n      <Sidebar.Header>\n        <div className=\"gap-ws-9 flex flex-col\">\n          <div className=\"gap-ws-7 pt-ws-3 pb-ws-7 flex items-center\">\n            <BrandMark className=\"size-ws-15\" />\n            <div className=\"flex min-w-0 flex-1 flex-col\">\n              <span className=\"typography-label-strong-sm text-ws-static-strong truncate\">\n                {workspace.name}\n              </span>\n              <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                {workspace.plan}\n              </span>\n            </div>\n            <DropdownMenu>\n              <DropdownMenu.Trigger asChild>\n                <IconButton\n                  icon={RiArrowDownSLine}\n                  variant=\"secondary\"\n                  preset=\"ghost\"\n                  size=\"xs\"\n                  aria-label=\"Switch workspace\"\n                  className=\"mr-ws-3\"\n                />\n              </DropdownMenu.Trigger>\n              <DropdownMenu.Content className=\"ws-block-utility\" align=\"end\">\n                <DropdownMenu.Item data-state=\"checked\">\n                  <ListItem.Content>\n                    <ListItem.Label>{workspace.name}</ListItem.Label>\n                  </ListItem.Content>\n                </DropdownMenu.Item>\n                <DropdownMenu.Separator />\n                <DropdownMenu.Item>\n                  <ListItem.Prefix>\n                    <RiAddLine className=\"size-ws-9\" />\n                  </ListItem.Prefix>\n                  <ListItem.Content>\n                    <ListItem.Label>New workspace</ListItem.Label>\n                  </ListItem.Content>\n                </DropdownMenu.Item>\n              </DropdownMenu.Content>\n            </DropdownMenu>\n          </div>\n          <TextInput size=\"sm\">\n            <TextInput.Prefix inner>\n              <TextInput.Icon icon={RiSearchLine} />\n            </TextInput.Prefix>\n            <TextInput.Input type=\"search\" placeholder=\"Search\" aria-label=\"Search\" />\n          </TextInput>\n        </div>\n      </Sidebar.Header>\n\n      <Sidebar.Section scrollable>\n        <Sidebar.Expanded>\n          <nav aria-label=\"Workspace\" className=\"gap-ws-9 flex flex-col\">\n            <div className=\"flex flex-col\">{mainLinks.map(link)}</div>\n            <div role=\"group\" aria-labelledby=\"sidebar-records\" className=\"gap-ws-2 flex flex-col\">\n              <Sidebar.SectionHeader id=\"sidebar-records\">Records</Sidebar.SectionHeader>\n              {recordLinks.map(link)}\n            </div>\n            <div role=\"group\" aria-labelledby=\"sidebar-insights\" className=\"gap-ws-2 flex flex-col\">\n              <Sidebar.SectionHeader id=\"sidebar-insights\">Insights</Sidebar.SectionHeader>\n              {insightLinks.map(link)}\n            </div>\n          </nav>\n        </Sidebar.Expanded>\n      </Sidebar.Section>\n\n      <Sidebar.Footer>\n        <div className=\"gap-ws-9 flex flex-col\">\n          <div className=\"gap-ws-3 flex flex-col\">{footerLinks.map(link)}</div>\n          {/* On the grey ground the line keeps the nav's inset: run edge to edge, it would stop\n              short of the page and read as broken. */}\n          <div className=\"border-ws-static-base pt-ws-5 border-t\">\n            <DropdownMenu>\n              <DropdownMenu.Trigger asChild>\n                <button\n                  type=\"button\"\n                  className=\"gap-ws-5 px-ws-5 py-ws-3 rounded-ws-control-lg hover:bg-ws-dynamic-tertiary-alpha-strong-default focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default flex w-full items-center text-left\"\n                >\n                  <PersonAvatar\n                    name={account.name}\n                    initials={account.initials}\n                    color={account.color}\n                    status=\"online\"\n                  />\n                  <span className=\"flex min-w-0 flex-1 flex-col\">\n                    <span className=\"typography-label-strong-sm text-ws-static-base truncate\">\n                      {account.name}\n                    </span>\n                    <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                      {account.email}\n                    </span>\n                  </span>\n                  <RiArrowDownSLine\n                    aria-hidden=\"true\"\n                    className=\"size-ws-9 text-ws-static-strong\"\n                  />\n                </button>\n              </DropdownMenu.Trigger>\n              <DropdownMenu.Content side=\"top\" align=\"start\" className=\"ws-block-utility w-[14rem]\">\n                <DropdownMenu.Item variant=\"danger\">\n                  <ListItem.Prefix>\n                    <RiLogoutBoxRLine className=\"size-ws-9\" />\n                  </ListItem.Prefix>\n                  <ListItem.Content>\n                    <ListItem.Label>Log out</ListItem.Label>\n                  </ListItem.Content>\n                </DropdownMenu.Item>\n              </DropdownMenu.Content>\n            </DropdownMenu>\n          </div>\n        </div>\n      </Sidebar.Footer>\n    </Sidebar>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
