const t=window.EdelElements.h;class e{constructor(){this.color=void 0,this.name=null,this.size=null,this.faStyle=null}render(){const{style:e,name:s}=this.getNormalizedStyleAndName();return t("i",{class:`${e} fa-${s} ${this.getSize(this.size)}`})}componentDidLoad(){this.color&&(this.hostElement.style.color=this.color)}getNormalizedStyleAndName(){const t=(this.name||"").match(/^(fa[sbrl]?)-(.*)$/);return t&&3===t.length?{style:t[1],name:t[2]}:{style:this.getFaStyle(this.faStyle),name:this.name}}getSize(t){return null!=t?"fa-"+t:""}getFaStyle(t){return t||"fas"}static get is(){return"edel-icon"}static get properties(){return{color:{type:String,attr:"color",watchCallbacks:["componentDidLoad"]},faStyle:{type:String,attr:"fa-style"},hostElement:{elementRef:!0},name:{type:String,attr:"name"},size:{type:String,attr:"size"}}}}export{e as EdelIcon};