{"version":3,"file":"text.mjs","names":[],"sources":["../../../../src/web-components/catalog/basic/text.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { TextApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { createLitComponent } from \"../../adapter\";\nimport { getBaseLeafStyle } from \"./utils\";\n\nexport const Text = createLitComponent(TextApi, ({ props }) => {\n  const text = props.text ?? \"\";\n  const style = { ...getBaseLeafStyle(), display: \"inline-block\" };\n\n  switch (props.variant) {\n    case \"h1\":\n      return html`<h1 style=${styleMap(style)}>${text}</h1>`;\n    case \"h2\":\n      return html`<h2 style=${styleMap(style)}>${text}</h2>`;\n    case \"h3\":\n      return html`<h3 style=${styleMap(style)}>${text}</h3>`;\n    case \"h4\":\n      return html`<h4 style=${styleMap(style)}>${text}</h4>`;\n    case \"h5\":\n      return html`<h5 style=${styleMap(style)}>${text}</h5>`;\n    case \"caption\":\n      return html`\n        <small\n          style=${styleMap({ ...style, color: \"#666\", textAlign: \"left\" })}\n          >${text}</small\n        >\n      `;\n    case \"body\":\n    default:\n      return html`<span style=${styleMap(style)}>${text}</span>`;\n  }\n});\n"],"mappings":";;;;;;;AAMA,MAAa,OAAO,mBAAmB,UAAU,EAAE,YAAY;CAC7D,MAAM,OAAO,MAAM,QAAQ;CAC3B,MAAM,QAAQ;EAAE,GAAG,kBAAkB;EAAE,SAAS;EAAgB;AAEhE,SAAQ,MAAM,SAAd;EACE,KAAK,KACH,QAAO,IAAI,aAAa,SAAS,MAAM,CAAC,GAAG,KAAK;EAClD,KAAK,KACH,QAAO,IAAI,aAAa,SAAS,MAAM,CAAC,GAAG,KAAK;EAClD,KAAK,KACH,QAAO,IAAI,aAAa,SAAS,MAAM,CAAC,GAAG,KAAK;EAClD,KAAK,KACH,QAAO,IAAI,aAAa,SAAS,MAAM,CAAC,GAAG,KAAK;EAClD,KAAK,KACH,QAAO,IAAI,aAAa,SAAS,MAAM,CAAC,GAAG,KAAK;EAClD,KAAK,UACH,QAAO,IAAI;;kBAEC,SAAS;GAAE,GAAG;GAAO,OAAO;GAAQ,WAAW;GAAQ,CAAC,CAAC;aAC9D,KAAK;;;EAId,QACE,QAAO,IAAI,eAAe,SAAS,MAAM,CAAC,GAAG,KAAK;;EAEtD"}