"use strict";const t=require("vue"),m=require("./useComputedDirection.cjs"),v=require("./useComputedLanguage.cjs"),u=require("./constants.js"),z=require("./_plugin-vue_export-helper.js"),g='',f='',M='',L='',y='',C='',H='',k='',S='',V='',F='',_='',x='',B='',$='',E='',w='',A='',b='',q=g,I=f,j=M,D=L,P=y,T=C,Z=H,O=k,X=S,Y={langCodeMap:{ar:V},default:F},N={ltr:_,shouldFlip:!0},G={ltr:x,shouldFlip:!0},J={ltr:B,shouldFlip:!0},K={ltr:$,shouldFlip:!0},Q=E,R=w,U=A,W=b;function e1(e,n,o){if(typeof e=="string"||"path"in e)return e;if("shouldFlip"in e)return e.ltr;if("rtl"in e)return o==="rtl"?e.rtl:e.ltr;const a=n in e.langCodeMap?e.langCodeMap[n]:e.default;return typeof a=="string"||"path"in a?a:a.ltr}function t1(e,n){if(typeof e=="string")return!1;if("langCodeMap"in e){const o=n in e.langCodeMap?e.langCodeMap[n]:e.default;if(typeof o=="string")return!1;e=o}if("shouldFlipExceptions"in e&&Array.isArray(e.shouldFlipExceptions)){const o=e.shouldFlipExceptions.indexOf(n);return o===void 0||o===-1}return"shouldFlip"in e?e.shouldFlip:!1}const n1=u.makeStringTypeValidator(u.IconSizes),o1=t.defineComponent({name:"CdxIcon",props:{icon:{type:[String,Object],required:!0},iconLabel:{type:String,default:""},lang:{type:String,default:null},dir:{type:String,default:null},size:{type:String,default:"medium",validator:n1}},setup(e){const n=t.ref(),o=m(n),a=v(n),d=t.computed(()=>{var l;return(l=e.dir)!=null?l:o.value}),i=t.computed(()=>{var l;return(l=e.lang)!=null?l:a.value}),s=t.computed(()=>({"cdx-icon--flipped":d.value==="rtl"&&i.value!==null&&t1(e.icon,i.value),["cdx-icon--".concat(e.size)]:!0})),r=t.computed(()=>{var l,p;return e1(e.icon,(l=i.value)!=null?l:"",(p=d.value)!=null?p:"ltr")}),h=t.computed(()=>typeof r.value=="string"?r.value:""),c=t.computed(()=>typeof r.value!="string"?r.value.path:"");return{rootElement:n,rootClasses:s,iconSvg:h,iconPath:c}}}),l1=["aria-hidden"],a1={key:0},i1=["innerHTML"],r1=["d"];function d1(e,n,o,a,d,i){return t.openBlock(),t.createElementBlock("span",{ref:"rootElement",class:t.normalizeClass(["cdx-icon",e.rootClasses])},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":e.iconLabel?void 0:!0},[e.iconLabel?(t.openBlock(),t.createElementBlock("title",a1,t.toDisplayString(e.iconLabel),1)):t.createCommentVNode("v-if",!0),e.iconSvg?(t.openBlock(),t.createElementBlock("g",{key:1,innerHTML:e.iconSvg},null,8,i1)):(t.openBlock(),t.createElementBlock("path",{key:2,d:e.iconPath},null,8,r1))],8,l1))],2)}const p1=z._export_sfc(o1,[["render",d1]]);exports.$3=j;exports.$7=U;exports.CdxIcon=p1;exports.F8=W;exports.P7=R;exports.V3=q;exports.X6=G;exports.Y4=X;exports.Z3=I;exports.a4=D;exports.g7=K;exports.h4=P;exports.h6=Y;exports.j6=N;exports.o7=J;exports.u4=O;exports.w7=Q;exports.x4=Z;exports.z4=T;