import{G as e,_ as t,b as n,s as r}from"./runtime-core.esm-bundler-Babufkcf.js";import{t as i}from"./create-CGAkPJkS.js";var a={xs:18,sm:24,md:32,lg:38,xl:46},o={size:String};function s(e,t=a){return r(()=>e.size===void 0?null:{fontSize:e.size in t?`${t[e.size]}px`:e.size})}function c(e,t){return e===void 0?t:e()||t}function l(e,t){if(e!==void 0){let t=e();if(t!=null)return[...t]}return t}function u(e,t){return e===void 0?t:t.concat(e())}function d(e,t){return e===void 0?t:t===void 0?e():t.concat(e())}function f(t,r,i,a,o,s){r.key=a+o;let c=n(t,r,i);return o?e(c,s()):c}var p=`0 0 24 24`,m=e=>e,h=e=>`ionicons ${e}`,g={"mdi-":e=>`mdi ${e}`,"icon-":m,"bt-":e=>`bt ${e}`,"eva-":e=>`eva ${e}`,"ion-md":h,"ion-ios":h,"ion-logo":h,"iconfont ":m,"ti-":e=>`themify-icon ${e}`,"bi-":e=>`bootstrap-icons ${e}`,"i-":m},_={o_:`-outlined`,r_:`-round`,s_:`-sharp`},v={sym_o_:`-outlined`,sym_r_:`-rounded`,sym_s_:`-sharp`},y=RegExp(`^(`+Object.keys(g).join(`|`)+`)`),b=RegExp(`^(`+Object.keys(_).join(`|`)+`)`),x=RegExp(`^(`+Object.keys(v).join(`|`)+`)`),S=/^[Mm]\s?[-+]?\.?\d/,C=/^img:/,w=/^svguse:/,T=/^ion-/,E=/^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /,D=i({name:`QIcon`,props:{...o,tag:{type:String,default:`i`},name:String,color:String,left:Boolean,right:Boolean},setup(e,{slots:i}){let{proxy:{$q:a}}=t(),o=s(e),l=r(()=>`q-icon`+(e.left?` on-left`:``)+(e.right?` on-right`:``)+(e.color===void 0?``:` text-${e.color}`)),d=r(()=>{let t,r=e.name;if(r===`none`||!r)return{none:!0};if(a.iconMapFn!==null){let e=a.iconMapFn(r);if(e!==void 0){if(e.icon!==void 0){if(r=e.icon,r===`none`||!r)return{none:!0}}else return{cls:e.cls,content:e.content===void 0?` `:e.content}}}if(S.test(r)){let[e,t=p]=r.split(`|`);return{svg:!0,viewBox:t,nodes:e.split(`&&`).map(e=>{let[t,r,i]=e.split(`@@`);return n(`path`,{style:r,d:t,transform:i})})}}if(C.test(r))return{img:!0,src:r.slice(4)};if(w.test(r)){let[e,t=p]=r.split(`|`);return{svguse:!0,src:e.slice(7),viewBox:t}}let i=` `,o=r.match(y);if(o!==null)t=g[o[1]](r);else if(E.test(r))t=r;else if(T.test(r))t=`ionicons ion-${a.platform.is.ios?`ios`:`md`}${r.slice(3)}`;else if(x.test(r)){t=`notranslate material-symbols`;let e=r.match(x);e!==null&&(r=r.slice(6),t+=v[e[1]]),i=r}else{t=`notranslate material-icons`;let e=r.match(b);e!==null&&(r=r.slice(2),t+=_[e[1]]),i=r}return{cls:t,content:i}});return()=>{let t={class:l.value,style:o.value,"aria-hidden":`true`};return d.value.none?n(e.tag,t,c(i.default)):d.value.img?n(e.tag,t,u(i.default,[n(`img`,{src:d.value.src})])):d.value.svg?n(e.tag,t,u(i.default,[n(`svg`,{viewBox:d.value.viewBox||`0 0 24 24`},d.value.nodes)])):d.value.svguse?n(e.tag,t,u(i.default,[n(`svg`,{viewBox:d.value.viewBox},[n(`use`,{"xlink:href":d.value.src})])])):(d.value.cls!==void 0&&(t.class+=` `+d.value.cls),n(e.tag,t,u(i.default,[d.value.content])))}}});export{c as a,a as c,d as i,o as l,f as n,l as o,u as r,s,D as t};