{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The head row of a hero band: skip link, brand, menu links (the current one carries aria-current), login and a call to action.",
  "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/hero-head.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/link\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// HeroHeadProps are the props of HeroHead; the values are the JSON shapes of the TypeScript props.\ntype HeroHeadProps struct {\n\tBrand any `json:\"brand\"`\n\tBrandHref any `json:\"brandHref\"`\n\tLinks any `json:\"links\"`\n\tCurrent any `json:\"current\"`\n\tLogin any `json:\"login\"`\n\tLoginHref any `json:\"loginHref\"`\n\tCta any `json:\"cta\"`\n\tHref any `json:\"href\"`\n\tSkip any `json:\"skip\"`\n\tNavLabel any `json:\"navLabel\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The head row of a hero band: skip link, brand, menu links (the current one carries aria-current), login and a call to action.\ntempl HeroHead(p HeroHeadProps) {\n\t{{ vBrand := p.Brand }}\n\t{{ vBrandHref := p.BrandHref }}\n\t{{ vLinks := p.Links }}\n\t{{ vCurrent := uiutils.Def(p.Current, \"\") }}\n\t{{ vLogin := p.Login }}\n\t{{ vLoginHref := p.LoginHref }}\n\t{{ vCta := p.Cta }}\n\t{{ vHref := p.Href }}\n\t{{ vSkip := p.Skip }}\n\t{{ vNavLabel := p.NavLabel }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"header\", Class: uiutils.S(uiutils.Cnv(\"flex w-full flex-wrap items-center justify-between pr-4\", uiutils.Get(presetDefaults, \"hero\", \"head\"))), Attrs: uiutils.Attrs(\"aria-label\", vLandmarkLabel, \"data-slot\", \"hero-head\")}}) {\n\t\tif uiutils.T(vSkip) {\n\t\t\t@compose.LinkPlain(compose.LinkPlainProps{LinkProps: link.LinkProps{Href: \"#main-content\", Class: \"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:text-foreground focus:inset-ring focus:inset-ring-border\", Attrs: uiutils.Attrs(\"data-slot\", \"skip-link\")}}) {\n\t\t\t\t{ uiutils.Text(vSkip) }\n\t\t\t}\n\t\t}\n\t\t@MenuEntry(MenuEntryProps{Href: vBrandHref, Class: uiutils.Cnv(uiutils.Cnv(uiutils.Get(presetDefaults, \"text\", \"small\"), \"font-medium leading-6 text-background\")), Testid: \"brand\"}) {\n\t\t\t{ uiutils.Text(vBrand) }\n\t\t}\n\t\tif uiutils.T(uiutils.And(vLinks, uiutils.Gt(uiutils.Len(vLinks), float64(0)))) {\n\t\t\t@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl(\"{0}, {1}\", vNavLabel, vLandmarkLabel)), vNavLabel), Testid: \"site-nav\"}) {\n\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"8\", Align: \"center\", BoxProps: box.BoxProps{Class: \"flex-wrap\"}}) {\n\t\t\t\t\tfor _, vL := range uiutils.L(vLinks) {\n\t\t\t\t\t\tif uiutils.T(uiutils.Get(vL, \"href\")) {\n\t\t\t\t\t\t\t@compose.Link(compose.LinkProps{Variant: \"default\", LinkProps: link.LinkProps{Href: uiutils.URL(uiutils.Get(vL, \"href\"), false), AriaCurrent: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vL, \"id\"), vCurrent)), \"page\", nil)), Class: \"text-xs font-medium leading-5 text-background\", Attrs: uiutils.Attrs(\"data-slot\", \"nav-link\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vL, \"name\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-xs font-medium leading-5 text-background\", Attrs: uiutils.Attrs(\"data-slot\", \"nav-link\")}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vL, \"name\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", BoxProps: box.BoxProps{}}) {\n\t\t\tif uiutils.T(vLogin) {\n\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"ghost\", Size: \"sm\", ButtonProps: button.ButtonProps{Href: uiutils.URL(vLoginHref, false), Class: \"text-background hover:bg-background/10\"}}) {\n\t\t\t\t\t{ uiutils.Text(vLogin) }\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uiutils.T(vCta) {\n\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"secondary\", Size: \"sm\", ButtonProps: button.ButtonProps{Href: uiutils.URL(vHref, false)}}) {\n\t\t\t\t\t{ uiutils.Text(vCta) }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/hero-head.templ",
      "target": "blocks/hero-head.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "hero-head",
  "registryDependencies": [
    "block",
    "button",
    "group",
    "inline",
    "kit-box",
    "kit-button",
    "kit-link",
    "kit-text",
    "link",
    "link-plain",
    "menu-entry",
    "nav-block",
    "presets",
    "utils"
  ],
  "runtime": "templ",
  "title": "Hero Head",
  "type": "registry:component"
}
