{"version":3,"file":"text.cjs","names":["z","CommonSchemas","createLitComponent"],"sources":["../../../../src/web-components/catalog/minimal/text.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { CommonSchemas } from \"@a2ui/web_core/v0_9\";\nimport { z } from \"zod\";\nimport { createLitComponent } from \"../../adapter\";\n\nexport const TextSchema = z.object({\n  text: CommonSchemas.DynamicString,\n  variant: z.enum([\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"caption\", \"body\"]).optional(),\n});\n\nexport const TextApiDef = {\n  name: \"Text\",\n  schema: TextSchema,\n};\n\nexport const Text = createLitComponent(TextApiDef, ({ props }) => {\n  const text = props.text ?? \"\";\n  switch (props.variant) {\n    case \"h1\":\n      return html`<h1>${text}</h1>`;\n    case \"h2\":\n      return html`<h2>${text}</h2>`;\n    case \"h3\":\n      return html`<h3>${text}</h3>`;\n    case \"h4\":\n      return html`<h4>${text}</h4>`;\n    case \"h5\":\n      return html`<h5>${text}</h5>`;\n    case \"caption\":\n      return html`<small>${text}</small>`;\n    case \"body\":\n    default:\n      return html`<span>${text}</span>`;\n  }\n});\n"],"mappings":";;;;;;AAKA,MAAa,aAAaA,MAAE,OAAO;CACjC,MAAMC,kCAAc;CACpB,SAASD,MAAE,KAAK;EAAC;EAAM;EAAM;EAAM;EAAM;EAAM;EAAW;EAAO,CAAC,CAAC,UAAU;CAC9E,CAAC;AAEF,MAAa,aAAa;CACxB,MAAM;CACN,QAAQ;CACT;AAED,MAAa,OAAOE,mCAAmB,aAAa,EAAE,YAAY;CAChE,MAAM,OAAO,MAAM,QAAQ;AAC3B,SAAQ,MAAM,SAAd;EACE,KAAK,KACH,QAAO,QAAI,OAAO,KAAK;EACzB,KAAK,KACH,QAAO,QAAI,OAAO,KAAK;EACzB,KAAK,KACH,QAAO,QAAI,OAAO,KAAK;EACzB,KAAK,KACH,QAAO,QAAI,OAAO,KAAK;EACzB,KAAK,KACH,QAAO,QAAI,OAAO,KAAK;EACzB,KAAK,UACH,QAAO,QAAI,UAAU,KAAK;EAE5B,QACE,QAAO,QAAI,SAAS,KAAK;;EAE7B"}