(function(i,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(i=typeof globalThis!="undefined"?globalThis:i||self,n(i.index={},i.Vue))})(this,function(i,n){"use strict";const I={name:{type:String,default:""},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},b={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function p(l,t,s){let o=l;return t&&(o+=`__${t}`),s&&(o+=`--${s}`),o}function d(l,t=!1){const s=t?`.devui-${l}`:`devui-${l}`;return{b:()=>p(s),e:e=>e?p(s,e):"",m:e=>e?p(s,"",e):"",em:(e,a)=>e&&a?p(s,e,a):""}}var V="",h=n.defineComponent({name:"DSvgIcon",props:b,setup(l){const{name:t,color:s,size:o}=n.toRefs(l),c=d("svg-icon"),r=n.computed(()=>`#icon-${t.value}`),u=n.computed(()=>typeof o.value=="number"?`${o.value}px`:o.value),e={width:u.value,height:u.value};return()=>n.createVNode("svg",{class:c.b(),style:e},[n.createVNode("use",{"xlink:href":r.value,fill:s.value},null)])}});function D(l){return/^((http|https):)?\/\//.test(l)}function S(l,t){const{component:s,name:o,size:c,color:r,classPrefix:u,rotate:e}=n.toRefs(l),a=d("icon"),m=n.computed(()=>typeof c.value=="number"?`${c.value}px`:c.value),f=s.value?n.resolveDynamicComponent(s.value):n.resolveDynamicComponent(h),v=()=>n.createVNode("img",n.mergeProps({src:o.value,alt:o.value.split("/")[o.value.split("/").length-1],class:[(e==null?void 0:e.value)==="infinite"&&a.m("spin")],style:{width:m.value||"",transform:`rotate(${e==null?void 0:e.value}deg)`,verticalAlign:"middle"}},t.attrs),null),P=()=>n.createVNode(f,n.mergeProps({name:o.value,color:r.value,size:m.value,class:[(e==null?void 0:e.value)==="infinite"&&a.m("spin")],style:{transform:`rotate(${e==null?void 0:e.value}deg)`}},t.attrs),null),$=()=>{const C=/^icon-/.test(o.value)?o.value:`${u.value}-${o.value}`;return n.createVNode("i",n.mergeProps({class:[u.value,C,(e==null?void 0:e.value)==="infinite"&&a.m("spin")],style:{fontSize:m.value,color:r.value,transform:`rotate(${e==null?void 0:e.value}deg)`}},t.attrs),null)};return{iconDom:()=>s.value?P():D(o.value)?v():$()}}var g=n.defineComponent({name:"DIcon",props:I,emits:["click"],setup(l,t){const{disabled:s,operable:o}=n.toRefs(l),{iconDom:c}=S(l,t),r=d("icon"),u=n.computed(()=>({[r.e("container")]:!0,[r.m("disabled")]:s.value,[r.m("operable")]:o.value,[r.m("no-slots")]:!Object.keys(t.slots).length})),e=a=>{s.value||t.emit("click",a)};return()=>{var a,m,f,v;return n.createVNode("div",{class:u.value,onClick:e},[(m=(a=t.slots).prefix)==null?void 0:m.call(a),c(),(v=(f=t.slots).suffix)==null?void 0:v.call(f)])}}}),_="",y=n.defineComponent({name:"DIconGroup",setup(l,t){const s=d("icon-group");return()=>{var o,c;return n.createVNode("div",{class:s.b()},[(c=(o=t.slots).default)==null?void 0:c.call(o)])}}}),N={title:"Icon \u56FE\u6807",category:"\u901A\u7528",status:"100%",install(l){l.component(g.name,g),l.component(y.name,y)}};i.Icon=g,i.IconGroup=y,i.default=N,i.iconProps=I,i.svgIconProps=b,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
