"use strict";const e=require("vue"),u=require("./base-iCmnU-fv.js"),v=["href","target"],y=["href"],g=e.defineComponent({name:"ClLink",__name:"Index",props:{wavesColor:{type:String,default:"black",validator:o=>["black","white"].indexOf(o)!==-1},url:{type:[String,Object],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},isUnderline:{type:Boolean,default:!1},isLight:{type:Boolean,default:!1},isWaves:{type:Boolean,default:!1},isTargetBlank:{type:Boolean,default:!1},isOutside:{type:Boolean,default:!1},isStopPropagation:{type:Boolean,default:!1}},emits:["onClick","onHoverIn","onHoverOut"],setup(o,{emit:d}){const l=o,i=d,m=e.computed(()=>!u.CommonBase.isEmpty(l.url)),n=e.computed(()=>{const t={"btn-link":!0,"btn-link-disabled":l.disabled,"always-light":l.isLight,"underline-none":!l.isUnderline};return u.CommonBase.isEmpty(l.className)||l.className?.split(" ").forEach(c=>{u.CommonBase.isEmpty(c)||(t[c]=!0)}),t}),k=t=>{i("onClick",t)},f=t=>{i("onHoverIn",t)},p=t=>{i("onHoverOut",t)},a=t=>{l.disabled||(k(t),l.isStopPropagation&&(t.preventDefault(),t.stopPropagation()))},s=t=>{l.disabled||f(t)},r=t=>{l.disabled||p(t)};return(t,c)=>{const B=e.resolveComponent("router-link");return o.url&&m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(n.value)},[e.renderSlot(t.$slots,"default")],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.isOutside?(e.openBlock(),e.createElementBlock("a",{key:0,class:e.normalizeClass(n.value),href:o.url.toString(),target:o.isTargetBlank?"_blank":"",onClick:a,onMouseenter:s,onMouseleave:r},[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"default")])],42,v)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.isTargetBlank?(e.openBlock(),e.createElementBlock("a",{key:0,class:e.normalizeClass(n.value),href:o.url.toString(),target:"_blank",onClick:e.withModifiers(a,["stop"]),onMouseenter:s,onMouseleave:r},[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"default")])],42,y)):(e.openBlock(),e.createBlock(B,{key:1,class:e.normalizeClass(n.value),to:o.url,onClick:e.withModifiers(a,["stop"])},{default:e.withCtx(()=>[e.createElementVNode("span",{onMouseenter:s,onMouseleave:r},[e.renderSlot(t.$slots,"default")],32)]),_:3},8,["class","to"]))],64))],64))],64)):(e.openBlock(),e.createElementBlock("a",{key:1,class:e.normalizeClass(n.value),href:"javascript:",onClick:a,onMouseenter:s,onMouseleave:r},[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"default")])],34))}}});exports._sfc_main=g;
//# sourceMappingURL=Index.vue_vue_type_script_setup_true_lang-C4XFCLbD.js.map
