{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "entity",
  "title": "Entity",
  "description": "An agent or a person as a row.",
  "registryDependencies": [
    "https://creance.pages.dev/r/avatar.json",
    "https://creance.pages.dev/r/creance-base.json"
  ],
  "files": [
    {
      "path": "entity/Entity.css",
      "content": ".cr-entity {\n  display: flex;\n  align-items: center;\n  gap: var(--cr-space-3);\n  padding: 14px var(--cr-space-4);\n  border-radius: 14px;\n  color: var(--cr-color-text-default);\n  font-family: var(--cr-font-family-sans);\n}\n\n.cr-entity .cr-avatar {\n  width: 40px;\n  height: 40px;\n}\n\n.cr-entity__text {\n  display: grid;\n  flex: 1;\n  gap: 2px;\n  min-width: 0;\n}\n\n.cr-entity__name {\n  font-size: var(--cr-font-size-md);\n}\n\n.cr-entity__description {\n  overflow: hidden;\n  color: var(--cr-color-text-muted);\n  font-size: var(--cr-font-size-sm);\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.cr-entity__actions {\n  display: flex;\n  gap: var(--cr-space-2);\n}\n",
      "type": "registry:file",
      "target": "@components/creance/entity/Entity.css"
    },
    {
      "path": "entity/Entity.tsx",
      "content": "import type { ReactNode } from 'react';\nimport { Avatar } from '@/components/creance/avatar/Avatar';\nimport { cx } from '@/lib/creance/cx';\nimport './Entity.css';\n\nexport interface EntityProps {\n  name: string;\n  kind?: 'agent' | 'human';\n  /** One line under the name. */\n  description?: ReactNode;\n  /** Buttons or a DotsMenu at the end of the row. */\n  actions?: ReactNode;\n  className?: string;\n}\n\n/** An agent or a person as a row: avatar, name, a line of detail, and actions. */\nexport function Entity({ name, kind = 'agent', description, actions, className }: EntityProps) {\n  return (\n    <div className={cx('cr-entity cr-surface', className)}>\n      <Avatar name={name} kind={kind} decorative />\n      <div className=\"cr-entity__text\">\n        <strong className=\"cr-entity__name\">{name}</strong>\n        {description && <span className=\"cr-entity__description\">{description}</span>}\n      </div>\n      {actions && <div className=\"cr-entity__actions\">{actions}</div>}\n    </div>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/creance/entity/Entity.tsx"
    }
  ],
  "categories": [
    "molecule",
    "data-display"
  ],
  "type": "registry:ui"
}