{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A page for something that went wrong, such as a missing page: a code, a heading, a sentence and the way back.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/error-page.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ErrorPageProps are the props of ErrorPage; the values are the JSON shapes of the TypeScript props.\ntype ErrorPageProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tText any `json:\"text\"`\n\tStatus any `json:\"status\"`\n\tActions any `json:\"actions\"`\n\tLevel any `json:\"level\"`\n\tLayout any `json:\"layout\"`\n\tCode any `json:\"code\"`\n\tTone any `json:\"tone\"`\n\tImage any `json:\"image\"`\n\tImageAlt any `json:\"imageAlt\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A page that tells the visitor something went wrong: an icon or a big code, a heading, a sentence and the way back. Axes: layout (centered, split: the picture beside the text), code (show, hide), actions mode (one, two), tone.\ntempl ErrorPage(p ErrorPageProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vText := p.Text }}\n\t{{ vStatus := p.Status }}\n\t{{ vActions := p.Actions }}\n\t{{ vLevel := uiutils.Def(p.Level, float64(1)) }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"centered\") }}\n\t{{ vCode := uiutils.Def(p.Code, \"show\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vImage := p.Image }}\n\t{{ vImageAlt := p.ImageAlt }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vText, Heading: map[string]any{\"level\": vLevel}, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"split\", \"stack\"), Media: map[string]any{\"show\": uiutils.Eq(vLayout, \"split\")}, Align: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"start\", \"center\"), Tone: vTone, Density: \"roomy\", LandmarkLabel: vLandmarkLabel, Aside: errorPageFill1(p, vTitle, vImage, vImageAlt)}) {\n\t\tif uiutils.Eq(vCode, \"show\") {\n\t\t\t@compose.Text(compose.TextProps{Size: \"4xl\", Weight: \"bold\", TextProps: text.TextProps{Class: uiutils.S(uiutils.Cnv(\"text-8xl text-muted-foreground\", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"\", \"text-center\"))), Attrs: uiutils.Attrs(\"data-slot\", \"error-code\")}}) {\n\t\t\t\t{ uiutils.Text(vStatus) }\n\t\t\t}\n\t\t}\n\t\t@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, \"cta\"), PrimaryHref: uiutils.Get(vActions, \"href\"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, \"mode\"), \"two\")), uiutils.Get(vActions, \"secondary\"), nil), SecondaryHref: uiutils.Get(vActions, \"secondaryHref\"), Align: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"split\")), \"start\", \"center\")})\n\t}\n}\n\ntempl errorPageFill1(p ErrorPageProps, vTitle any, vImage any, vImageAlt any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage, Ratio: \"4/3\"})\n}\n",
      "path": "blocks/error-page.templ",
      "target": "blocks/error-page.templ"
    }
  ],
  "meta": {
    "category": "support",
    "group": "states",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "error-page",
  "registryDependencies": [
    "action-group",
    "kit-text",
    "media-frame",
    "section-frame",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Error Page",
  "type": "registry:block"
}
