{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Order Rows component",
  "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<!-- The orders as a table (the table layout of OrderTable): number, date, items, total and a status pill. -->\n<script lang=\"ts\">\nimport type { Order, OrderLabels } from \"../blocks/order-table.types\";\n\nexport type OrderRowsProps = {\n  orders: Order[];\n  statuses: Record<string, string>;\n  labels: OrderLabels;\n  density?: \"default\" | \"compact\";\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Table from \"../compose/Table.vue\";\nimport TableBody from \"../compose/TableBody.vue\";\nimport TableCaption from \"../compose/TableCaption.vue\";\nimport TableCell from \"../compose/TableCell.vue\";\nimport TableHead from \"../compose/TableHead.vue\";\nimport TableHeadCell from \"../compose/TableHeadCell.vue\";\nimport TableRow from \"../compose/TableRow.vue\";\nimport Pill from \"../components/pill.vue\";\nimport { at, cn, fmtMoney, tpl } from \"../utils\";\n\nconst { orders, statuses, labels, density = \"default\" } = defineProps<OrderRowsProps>();\n</script>\n\n<template>\n  <Box class=\"w-full overflow-x-auto\" data-slot=\"order-rows\">\n    <Table class=\"w-full text-left text-sm\" data-slot=\"order-table\">\n      <TableCaption class=\"sr-only\">\n        {{ labels.caption }}\n      </TableCaption>\n      <TableHead>\n        <TableRow>\n          <TableHeadCell scope=\"col\" class=\"py-2\">\n            {{ labels.number }}\n          </TableHeadCell>\n          <TableHeadCell scope=\"col\" class=\"py-2\">\n            {{ labels.date }}\n          </TableHeadCell>\n          <TableHeadCell scope=\"col\" class=\"py-2\">\n            {{ labels.items }}\n          </TableHeadCell>\n          <TableHeadCell scope=\"col\" class=\"py-2\">\n            {{ labels.total }}\n          </TableHeadCell>\n          <TableHeadCell scope=\"col\" class=\"py-2\">\n            {{ labels.status }}\n          </TableHeadCell>\n        </TableRow>\n      </TableHead>\n      <TableBody>\n        <TableRow v-for=\"o in orders\" :key=\"o.id\" class=\"border-t border-border\" data-slot=\"item\">\n          <TableCell :class=\"cn('font-semibold', (((density as string) === 'compact') ? 'py-2' : 'py-4'))\">\n            {{ o.number }}\n          </TableCell>\n          <TableCell>\n            {{ o.date }}\n          </TableCell>\n          <TableCell>\n            {{ tpl(labels.itemsCount, o.items) }}\n          </TableCell>\n          <TableCell>\n            {{ fmtMoney(o.total, o.currency) }}\n          </TableCell>\n          <TableCell>\n            <Pill\n              :tone=\"\n                o.status === 'paid' ? 'green'\n                : o.status === 'shipped' ? 'blue'\n                : o.status === 'pending' ? 'amber'\n                : 'gray'\n              \"\n            >\n              {{ at(statuses, o.status) }}\n            </Pill>\n          </TableCell>\n        </TableRow>\n      </TableBody>\n    </Table>\n  </Box>\n</template>\n",
      "path": "components/order-rows.vue",
      "target": "components/order-rows.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "order-rows",
  "registryDependencies": [
    "box",
    "order-table",
    "pill",
    "table",
    "table-body",
    "table-caption",
    "table-cell",
    "table-head",
    "table-head-cell",
    "table-row",
    "utils"
  ],
  "runtime": "vue",
  "title": "Order Rows",
  "type": "registry:component"
}
