{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "jsonforms-boolean-toggle-cell",
  "description": "JSONForms switch cell for boolean fields inside array table layouts.",
  "dependencies": [
    "@jsonforms/core",
    "@jsonforms/react"
  ],
  "registryDependencies": [
    "switch"
  ],
  "files": [
    {
      "path": "registry/forms/renderers/cells/boolean-toggle-cell.tsx",
      "content": "import { and, CellProps, isBooleanControl, optionIs, rankWith } from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\n\nimport { Switch } from '~/components/ui/switch';\n\nconst BooleanToggleCell = ({ data, handleChange, path, enabled }: CellProps) => (\n    <Switch\n        checked={data ?? false}\n        onCheckedChange={checked => handleChange(path, checked)}\n        disabled={!enabled}\n    />\n);\n\nexport const booleanToggleCellTester = rankWith(2, and(isBooleanControl, optionIs('toggle', true)));\nexport default withJsonFormsCellProps(BooleanToggleCell);",
      "type": "registry:component",
      "target": "components/forms/renderers/cells/boolean-toggle-cell.tsx"
    }
  ],
  "type": "registry:component"
}