{"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.tsx"],"sourcesContent":["// !!! This code was automatically generated. You should not change it !!!\nimport type { BulletLegendConfigInterface } from \"@unovis/ts\";\nimport { BulletLegend } from \"@unovis/ts\";\nimport { createSignal, onCleanup, createEffect, on, onMount } from 'solid-js'\nimport { arePropsEqual } from '../../utils/props'\n\nexport type VisBulletLegendProps = BulletLegendConfigInterface\n\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n\nexport function VisBulletLegend(props: VisBulletLegendProps) {\n  const [component, setComponent] = createSignal<BulletLegend>()\n   \n  const [ref, setRef] = createSignal<HTMLDivElement>()\n\n  onMount(() => {\n    const r = ref()\n    if(r) setComponent(new BulletLegend(r, { ...props, renderIntoProvidedDomNode: true }));\n    \n    \n  })\n\n  onCleanup(() => {\n    component()?.destroy()\n    \n  })\n\n  createEffect(\n    on(\n      () => ({ ...props }),\n      (curr, prev) => {\n        if (!arePropsEqual(prev, curr)) {\n          component()?.setConfig(curr)\n          \n        }\n      },\n      {\n        defer: true\n      }\n    )\n  )\n\n  \n\n  return <div  ref={setRef} style={{ display:\"block\" }} />\n}\n"],"names":["VisBulletLegendSelectors","BulletLegend","selectors","VisBulletLegend","props","component","setComponent","createSignal","ref","setRef","onMount","r","renderIntoProvidedDomNode","onCleanup","destroy","createEffect","on","curr","prev","arePropsEqual","setConfig","defer","_el$","_tmpl$","_$use"],"mappings":"+OAQO,MAAMA,EAA2BC,EAAAA,aAAaC,UAE9C,SAASC,EAAgBC,EAA6B,CAC3D,KAAM,CAACC,EAAWC,CAAY,EAAIC,eAAAA,EAE5B,CAACC,EAAKC,CAAM,EAAIF,eAAAA,EAEtBG,OAAAA,EAAAA,QAAQ,IAAM,CACZ,MAAMC,EAAIH,EAAAA,EACPG,GAAGL,EAAa,IAAIL,EAAAA,aAAaU,EAAG,CAAE,GAAGP,EAAOQ,0BAA2B,EAAA,CAAM,CAAC,CAGvF,CAAC,EAEDC,EAAAA,UAAU,IAAM,CACdR,EAAAA,GAAaS,QAAAA,CAEf,CAAC,EAEDC,EAAAA,aACEC,EAAAA,GACE,KAAO,CAAE,GAAGZ,CAAAA,GACZ,CAACa,EAAMC,IAAS,CACTC,EAAAA,cAAcD,EAAMD,CAAI,GAC3BZ,EAAAA,GAAae,UAAUH,CAAI,CAG/B,EACA,CACEI,MAAO,EAAA,CAEX,CACF,GAIA,IAAA,CAAA,IAAAC,EAAAC,EAAAA,EAAAC,OAAAA,EAAAA,IAAkBf,EAAMa,CAAA,EAAAA,CAAA,GAAA,CAC1B"}