"use strict";const e=require("vue"),d=require("vue-router"),u={key:0,class:"cl-cell__left"},m={key:0,class:"cl-cell__icon-wrap"},k={key:2,class:"cl-cell__title-wrap"},B={key:0,class:"cl-cell__required"},y={class:"cl-cell__title"},S={key:0,class:"cl-cell__label"},v={key:0,class:"cl-cell__value"},g={key:1,class:"cl-cell__extra"},f={key:2,class:"cl-cell__right-icon"},C=e.defineComponent({name:"ClCell",__name:"Index",props:{className:String,title:String,value:String,label:String,icon:String,size:{type:String,default:"default"},url:String,to:[String,Object],replace:Boolean,border:{type:Boolean,default:!0},clickable:Boolean,isLink:Boolean,required:Boolean,center:Boolean,arrowDirection:{type:String,default:"right"}},emits:["click"],setup(t,{emit:n}){const c=d.useRouter(),o=t,r=n,s=e.computed(()=>{const l={};return o.className&&(l[o.className]=!0),o.border&&(l["cl-cell--border"]=!0),(o.clickable||o.isLink||o.to||o.url)&&(l["cl-cell--clickable"]=!0),o.size==="large"&&(l["cl-cell--large"]=!0),l}),a=e.computed(()=>({})),i=l=>{r("click",l),o.to?o.replace?c.replace(o.to):c.push(o.to):o.url&&(window.location.href=o.url)};return(l,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cl-cell",s.value]),style:e.normalizeStyle(a.value),onClick:i},[t.title||l.$slots.title||t.icon||l.$slots.icon?(e.openBlock(),e.createElementBlock("div",u,[l.$slots.icon?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(l.$slots,"icon")])):t.icon?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([t.icon,"cl-cell__icon"])},null,2)):e.createCommentVNode("",!0),t.title||l.$slots.title?(e.openBlock(),e.createElementBlock("div",k,[e.renderSlot(l.$slots,"title",{},()=>[t.required?(e.openBlock(),e.createElementBlock("span",B,"*")):e.createCommentVNode("",!0),e.createElementVNode("span",y,e.toDisplayString(t.title),1)]),t.label||l.$slots.label?(e.openBlock(),e.createElementBlock("div",S,[e.renderSlot(l.$slots,"label",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.label),1)])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cl-cell__body",{"cl-cell__body--center":t.center}])},[e.renderSlot(l.$slots,"default",{},()=>[t.value||l.$slots.value?(e.openBlock(),e.createElementBlock("div",v,[e.renderSlot(l.$slots,"value",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.value),1)])])):e.createCommentVNode("",!0)])],2),l.$slots.extra?(e.openBlock(),e.createElementBlock("div",g,[e.renderSlot(l.$slots,"extra")])):e.createCommentVNode("",!0),t.isLink?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(l.$slots,"rightIcon",{},()=>[e.createElementVNode("i",{class:e.normalizeClass(`cl-cell__arrow cl-cell__arrow--${t.arrowDirection}`)},null,2)])])):e.createCommentVNode("",!0)],6))}});module.exports=C;
//# sourceMappingURL=ClCell.cjs.map
