import{r as t,h as o,H as n}from"./p-21516f8c.js";import{g as s}from"./p-78bead9a.js";const e=":host section{margin-bottom:6em}:host h2{padding-top:0.125em;padding-bottom:0.125em;background:#222222;color:#f1f1f1;text-align:center}:host ul{columns:4 15em;column-gap:2em;column-rule:0.0625em solid #f1f1f1;list-style:none}:host li{display:flex;align-items:center;margin-bottom:1em;line-height:1.5em;box-shadow:0 0.0625em 0 0 #f1f1f1}:host lu-icon{color:#222222;font-size:2em}:host span{text-indent:0.5em}";const i=class{constructor(o){t(this,o);this.findCategory=t=>t.split("-")[0]}makeIconCategories(t){return t.filter(((t,o,n)=>{const s=o===n.length-1;return s?this.findCategory(t.name):this.findCategory(t.name)!==this.findCategory(n[o+1].name)})).map((t=>this.findCategory(t.name)))}groupIconsByCategory(t,o){return o.map((o=>t.filter((t=>o===this.findCategory(t.name)))))}async componentWillLoad(){return fetch(`${s()}icon-manifest.json`).then((t=>t.json())).then((t=>{this.iconCategories=this.makeIconCategories(t);this.iconsByCategory=this.groupIconsByCategory(t,this.iconCategories)})).catch((t=>console.error(t)))}render(){return o(n,null,this.iconCategories.map(((t,n)=>o("section",null,o("h2",null,t.toUpperCase()),o("ul",null,this.iconsByCategory[n].map((t=>o("li",null,o("lu-icon",{name:t.name}),o("span",null,t.name)))))))))}};i.style=e;export{i as lu_icon_finder};
//# sourceMappingURL=p-1fc17c24.entry.js.map