{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Features beside a picture: plain in two columns, as cards with actions, two figures over checked rows, or four metric cards with actions.",
  "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/feature-split.json\n\npackage blocks\n\nimport (\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// FeatureSplitProps are the props of FeatureSplit; the values are the JSON shapes of the TypeScript props.\ntype FeatureSplitProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tBadge any `json:\"badge\"`\n\tLevel any `json:\"level\"`\n\tFeatures any `json:\"features\"`\n\tStats any `json:\"stats\"`\n\tActions any `json:\"actions\"`\n\tLayout any `json:\"layout\"`\n\tMediaSide any `json:\"mediaSide\"`\n\tTone any `json:\"tone\"`\n\tImage any `json:\"image\"`\n\tImageAlt any `json:\"imageAlt\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Features beside a picture. Axes: layout (grid: four plain features in two columns, cards: four features as cards and the actions, stats: two figure cards over three checked rows beside a square picture, metrics: four metric cards and the actions), mediaSide, tone.\ntempl FeatureSplit(p FeatureSplitProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vBadge := uiutils.Def(p.Badge, \"\") }}\n\t{{ vLevel := uiutils.Def(p.Level, float64(2)) }}\n\t{{ vFeatures := p.Features }}\n\t{{ vStats := p.Stats }}\n\t{{ vActions := p.Actions }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"grid\") }}\n\t{{ vMediaSide := uiutils.Def(p.MediaSide, \"end\") }}\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: vLead, Heading: map[string]any{\"badge\": vBadge, \"level\": vLevel}, Tone: vTone, Layout: \"split\", Media: map[string]any{\"show\": true, \"side\": vMediaSide}, LandmarkLabel: vLandmarkLabel, Aside: featureSplitFill1(p, vTitle, vLayout, vImage, vImageAlt)}) {\n\t\tif uiutils.Eq(vLayout, \"grid\") {\n\t\t\tif uiutils.Gt(uiutils.Len(vFeatures), float64(0)) {\n\t\t\t\t@FeaturePairs(FeaturePairsProps{Features: vFeatures})\n\t\t\t}\n\t\t}\n\t\tif uiutils.Eq(vLayout, \"cards\") {\n\t\t\tif uiutils.Gt(uiutils.Len(vFeatures), float64(0)) {\n\t\t\t\t@FeatureCards(FeatureCardsProps{Features: vFeatures, Cols: \"1-2\", Item: \"tile\"})\n\t\t\t}\n\t\t}\n\t\tif uiutils.Eq(vLayout, \"stats\") {\n\t\t\tif uiutils.Gt(uiutils.Len(vFeatures), float64(0)) {\n\t\t\t\t@FeatureStatRows(FeatureStatRowsProps{Features: vFeatures, Stats: vStats})\n\t\t\t}\n\t\t}\n\t\tif uiutils.Eq(vLayout, \"metrics\") {\n\t\t\tif uiutils.Gt(uiutils.Len(vStats), float64(0)) {\n\t\t\t\t@FeatureMetricCards(FeatureMetricCardsProps{Stats: vStats})\n\t\t\t}\n\t\t}\n\t\tif uiutils.T(uiutils.Or(uiutils.Eq(vLayout, \"cards\"), uiutils.Eq(vLayout, \"metrics\"))) {\n\t\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\")})\n\t\t}\n\t}\n}\n\ntempl featureSplitFill1(p FeatureSplitProps, vTitle any, vLayout any, vImage any, vImageAlt any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage, Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"stats\")), \"1/1\", \"4/3\")})\n}\n",
      "path": "blocks/feature-split.templ",
      "target": "blocks/feature-split.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "feature-split",
  "registryDependencies": [
    "action-group",
    "feature-cards",
    "feature-metric-cards",
    "feature-pairs",
    "feature-stat-rows",
    "media-frame",
    "section-frame",
    "utils"
  ],
  "runtime": "templ",
  "title": "Feature Split",
  "type": "registry:block"
}
