{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "Alert",
  "dependencies": [
    "cn",
    "rescript-base-ui"
  ],
  "files": [
    {
      "path": "registry/base/ui/Alert.res",
      "content": "@@jsxConfig({version: 4, mode: \"automatic\", module_: \"BaseUi.BaseUiJsxDOM\"})\n\n@module(\"cn\")\nexternal cn: (string, option<string>) => string = \"cn\"\n\n@module(\"cn\")\nexternal cn3: (string, string, option<string>) => string = \"cn\"\n\nmodule Variant = {\n  @unboxed\n  type t =\n    | @as(\"default\") Default\n    | @as(\"destructive\") Destructive\n}\n\nlet alertVariantClass = (~variant: Variant.t) =>\n  switch variant {\n  | Default => \"bg-card text-card-foreground\"\n  | Destructive => \"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current\"\n  }\n\nlet base = \"grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full\"\n\ntype props = {variant?: Variant.t, ...BaseUi.Types.DomProps.t}\nlet toDomProps: props => BaseUi.Types.DomProps.t = %raw(`({variant, ...props}) => props`)\n\n@react.componentWithProps(props)\nlet make = (props: props) => {\n  let variant = props.variant->Option.getOr(Default)\n  <div\n    {...props->toDomProps}\n    role={props.role->Option.getOr(\"alert\")}\n    dataSlot={props.dataSlot->Option.getOr(\"alert\")}\n    className={cn3(base, alertVariantClass(~variant), props.className)}\n  />\n}\n\nmodule Title = {\n  @react.componentWithProps(BaseUi.Types.DomProps.t)\n  let make = (props: BaseUi.Types.DomProps.t) =>\n    <div\n      {...props}\n      dataSlot={props.dataSlot->Option.getOr(\"alert-title\")}\n      className={cn(\n        \"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\n        props.className,\n      )}\n    />\n}\n\nmodule Description = {\n  @react.componentWithProps(BaseUi.Types.DomProps.t)\n  let make = (props: BaseUi.Types.DomProps.t) =>\n    <div\n      {...props}\n      dataSlot={props.dataSlot->Option.getOr(\"alert-description\")}\n      className={cn(\n        \"text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground\",\n        props.className,\n      )}\n    />\n}\n\nmodule Action = {\n  @react.componentWithProps(BaseUi.Types.DomProps.t)\n  let make = (props: BaseUi.Types.DomProps.t) =>\n    <div\n      {...props}\n      dataSlot={props.dataSlot->Option.getOr(\"alert-action\")}\n      className={cn(\"absolute top-2 right-2\", props.className)}\n    />\n}\n",
      "type": "registry:file",
      "target": "@ui/Alert.res"
    }
  ],
  "type": "registry:ui"
}