{
  "component": {
    "id": "footer-consent",
    "name": "Consent preferences footer",
    "tier": "pro",
    "exampleId": "footer-consent",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/footer-consent-demo.tsx",
    "exportName": "FooterConsentDemo",
    "sha256": "e372963ea6969c6a7082dcc76c9aacea712143c034c8b6fd5db4391590a996be",
    "helperImports": [],
    "directComponentImports": [
      "footer-consent"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/footer-consent",
    "registryUrl": "https://tidalui.com/r/pro/footer-consent.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/footer-consent",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/footer-consent",
      "registryUrl": "https://tidalui.com/r/pro/footer-consent.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/footer-consent.tsx",
    "exports": [
      "TidalFooterConsent",
      "TidalFooterConsentCategory",
      "TidalFooterConsentLink",
      "TidalFooterConsentState"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/footer-consent.css",
      "components/ui/toggle-switch.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [
      "@tidal-pro/toggle-switch",
      "https://tidalui.com/r/tidal-button.json"
    ],
    "additionalRegistry": [],
    "installClosure": [
      "footer-consent",
      "tidal-button",
      "toggle-switch"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/footer-consent.css",
      "components/ui/toggle-switch.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/footer-consent.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/footer-pilot-07-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState, type MouseEvent } from \"react\";\n\nimport { TidalFooterConsent, type TidalFooterConsentCategory, type TidalFooterConsentLink, type TidalFooterConsentState } from \"./components/ui/footer-consent\";\n\nimport \"./components/ui/footer-consent.css\";\n\nimport \"./components/ui/toggle-switch.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .footer-pilot-07-demo {\\n  inline-size: 100%;\\n  min-inline-size: 0;\\n}\";\n\nconst categories: readonly TidalFooterConsentCategory[] = [\n  {\n    id: \"essential\",\n    label: \"Essential services\",\n    description: \"Needed to keep the site working.\",\n    required: true,\n  },\n  {\n    id: \"analytics\",\n    label: \"Analytics\",\n    description: \"Help us understand which pages are useful.\",\n  },\n];\n\nconst policyLinks: readonly TidalFooterConsentLink[] = [\n  { id: \"privacy\", label: \"Privacy policy\", href: \"#consent-privacy\" },\n  { id: \"cookies\", label: \"Cookie details\", href: \"#consent-cookies\" },\n];\n\nfunction handlePreviewClick(\n  label: string,\n  setStatus: (status: string) => void,\n) {\n  return (event: MouseEvent<HTMLAnchorElement>) => {\n    if (\n      event.defaultPrevented ||\n      event.button !== 0 ||\n      (event.detail !== 0 && event.detail !== 1) ||\n      event.metaKey ||\n      event.ctrlKey ||\n      event.shiftKey ||\n      event.altKey ||\n      event.currentTarget.target\n    ) {\n      return;\n    }\n    event.preventDefault();\n    setStatus(`${label} selected in this local preview.`);\n  };\n}\n\nexport function FooterConsentDemo() {\n  const [values, setValues] = useState<Readonly<Record<string, boolean>>>({\n    essential: true,\n    analytics: false,\n  });\n  const [saveState, setSaveState] = useState<TidalFooterConsentState>(\"idle\");\n  const [status, setStatus] = useState(\n    \"No preference result has been submitted.\",\n  );\n  const localPolicyLinks = policyLinks.map((link) => ({\n    ...link,\n    onClick: handlePreviewClick(String(link.label), setStatus),\n  }));\n\n  return (\n    <div className=\"footer-pilot-07-demo\">\n      <TidalFooterConsent\n        aria-label=\"Consent preferences footer example\"\n        brand={<span>TidalUI workspace</span>}\n        heading=\"Privacy preferences.\"\n        description=\"Choose which optional services you allow.\"\n        categories={categories}\n        values={values}\n        onCategoryChange={(id, checked) => {\n          setValues((current) => ({ ...current, [id]: checked }));\n          setSaveState(\"dirty\");\n          setStatus(\n            `${id} is now ${checked ? \"enabled\" : \"disabled\"} locally.`,\n          );\n        }}\n        policyLinks={localPolicyLinks}\n        onSubmit={(event) => {\n          event.preventDefault();\n          setSaveState(\"saved\");\n          setStatus(\n            \"Local preview only. The consumer callback received the supplied values; no cookies or storage were changed.\",\n          );\n        }}\n        onRejectOptional={() => {\n          setValues((current) => ({ ...current, analytics: false }));\n          setSaveState(\"saved\");\n          setStatus(\n            \"Optional choices were proposed as disabled in this local preview; the consumer owns persistence.\",\n          );\n        }}\n        saveState={saveState}\n        status={status}\n        legal={<span>Local preview. No cookies or storage are changed.</span>}\n      />\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <FooterConsentDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/footer-consent.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "saveState",
      "type": "inferred-from-existing-demo",
      "initial": "\"idle\"",
      "setter": "setSaveState",
      "proposalCanBeRejected": false
    },
    {
      "prop": "status",
      "type": "inferred-from-existing-demo",
      "initial": "\"No preference result has been submitted.\",",
      "setter": "setStatus",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onCategoryChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onRejectOptional",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSubmit",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "No error fixture is exposed by the existing demo; inject a consumer-owned failure state before production use.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
