{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notice-vue",
  "title": "Notice (Vue)",
  "description": "A calm callout for info, success, a warning or an error, with optional actions and Dismiss.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/vue@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/vue/notice.ts",
      "content": "import { noticePrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/vue/primitive\";\nimport { defineComponent, h, type Slot, type SlotsType, type VNode } from \"vue\";\n\n// The root's props and `#render` slot, with plain `default` and `#actions` slots for the notice's content.\ntype WithActions<C extends abstract new (...args: never) => { $slots: { render?: unknown } }> = new (\n  ...args: never\n) => Omit<InstanceType<C>, \"$slots\"> & {\n  $slots: { default?: () => VNode[]; actions?: () => VNode[]; render?: InstanceType<C>[\"$slots\"][\"render\"] };\n};\n\nconst parts = createParts(noticePrimitive, {\n  root: \"div\",\n  icon: \"span\",\n  title: \"p\",\n  description: \"div\",\n  reset: \"p\",\n  actions: \"div\",\n  dismiss: \"button\",\n});\n\n/** The bare root, for arranging the parts yourself. */\nexport const NoticeRoot = parts.Root;\nexport const NoticeIcon = parts.Icon;\nexport const NoticeDescription = parts.Description;\nexport const NoticeActions = parts.Actions;\nexport const NoticeDismiss = parts.Dismiss;\n\n/** The `label`, unless you fill the default slot. Rendered only with a `label`. */\nexport const NoticeTitle = defineComponent({\n  name: \"NoticeTitle\",\n  inheritAttrs: false,\n  setup(_, { attrs, slots }) {\n    return () =>\n      h(parts.Title, attrs, {\n        ...slots,\n        default: slots.default ?? (({ state }: { state: { label: string } }) => state.label),\n      });\n  },\n}) as unknown as typeof parts.Title;\n\n/** When the limit resets, like \"Resets Tuesday at 9:00 AM.\", unless you fill the default slot. Rendered only with `resets-at`. */\nexport const NoticeReset = defineComponent({\n  name: \"NoticeReset\",\n  inheritAttrs: false,\n  setup(_, { attrs, slots }) {\n    return () =>\n      h(parts.Reset, attrs, {\n        ...slots,\n        default: slots.default ?? (({ state }: { state: { text: string } }) => state.text),\n      });\n  },\n}) as unknown as typeof parts.Reset;\n\n/**\n * A calm callout: its mark, its `label` as the title, the reset line with `resets-at`, the default slot as its text,\n * then the `#actions` slot and Dismiss while `on-dismiss` is set and it's `dismissible`. To arrange the parts\n * yourself, use `NoticeRoot`.\n */\nexport const Notice = defineComponent({\n  name: \"Notice\",\n  inheritAttrs: false,\n  slots: Object as SlotsType<{ default?: () => VNode[]; actions?: () => VNode[]; render?: Slot }>,\n  setup(_, { attrs, slots }) {\n    return () =>\n      h(parts.Root, attrs, {\n        render: slots.render,\n        default: () => [\n          h(NoticeIcon),\n          h(NoticeTitle),\n          h(NoticeReset),\n          h(NoticeDescription, null, () => slots.default?.()),\n          h(NoticeActions, null, () => slots.actions?.()),\n          h(NoticeDismiss),\n        ],\n      });\n  },\n}) as unknown as WithActions<typeof parts.Root>;\n",
      "type": "registry:ui",
      "target": "@ui/vue/notice.ts"
    }
  ],
  "meta": {
    "layer": "vue"
  },
  "type": "registry:ui"
}
