{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "One entry of a menu: a link to its address, or, without one, its content as text in the same box (the magazine routes nothing, so it shows text). current marks the page the entry stands for (aria-current) either way.",
  "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/menu-entry.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\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// MenuEntryProps are the props of MenuEntry; the values are the JSON shapes of the TypeScript props.\ntype MenuEntryProps struct {\n\tHref any `json:\"href\"`\n\tCurrent any `json:\"current\"`\n\tVariant any `json:\"variant\"`\n\tSize any `json:\"size\"`\n\tTestid any `json:\"testid\"`\n\tBlock any `json:\"block\"`\n\tClass string `json:\"className\"`\n}\n\n// One entry of a menu: a link to its address, or, without one, its content as text in the same box (the magazine routes nothing, so it shows text). current marks the page the entry stands for (aria-current) either way.\ntempl MenuEntry(p MenuEntryProps) {\n\t{{ vHref := p.Href }}\n\t{{ vCurrent := uiutils.Def(p.Current, false) }}\n\t{{ vVariant := uiutils.Def(p.Variant, \"default\") }}\n\t{{ vSize := uiutils.Def(p.Size, \"default\") }}\n\t{{ vTestid := p.Testid }}\n\t{{ vBlock := uiutils.Def(p.Block, false) }}\n\tif uiutils.T(vHref) {\n\t\t@compose.Link(compose.LinkProps{Variant: uiutils.S(vVariant), Size: uiutils.S(vSize), LinkProps: link.LinkProps{Href: uiutils.URL(vHref, false), AriaCurrent: uiutils.S(uiutils.Cond(uiutils.T(vCurrent), \"page\", nil)), Class: uiutils.S(p.Class), Attrs: uiutils.Attrs(\"data-slot\", uiutils.Coalesce(vTestid, \"menu-entry\"))}}) {\n\t\t\t{ children... }\n\t\t}\n\t} else if uiutils.T(vBlock) {\n\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(p.Class), Attrs: uiutils.Attrs(\"aria-current\", uiutils.Cond(uiutils.T(vCurrent), \"page\", nil), \"data-slot\", uiutils.Coalesce(vTestid, \"menu-entry\"))}}) {\n\t\t\t{ children... }\n\t\t}\n\t} else {\n\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(p.Class), Attrs: uiutils.Attrs(\"aria-current\", uiutils.Cond(uiutils.T(vCurrent), \"page\", nil), \"data-slot\", uiutils.Coalesce(vTestid, \"menu-entry\"))}}) {\n\t\t\t{ children... }\n\t\t}\n\t}\n}\n",
      "path": "blocks/menu-entry.templ",
      "target": "blocks/menu-entry.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "menu-entry",
  "registryDependencies": [
    "box",
    "inline",
    "kit-box",
    "kit-link",
    "kit-text",
    "link",
    "utils"
  ],
  "runtime": "templ",
  "title": "Menu Entry",
  "type": "registry:component"
}
