import{q as y,B as u,a2 as C,F as E,t as e,L,as as _,aO as B,I as h,r as l,av as d,S as p,aB as T}from"./index.10c3f8e5.js";const A=`
  <path class="path" d="
    M 30 15
    L 28 17
    M 25.61 25.61
    A 15 15, 0, 0, 1, 15 30
    A 15 15, 0, 1, 1, 27.99 7.5
    L 15 15
  "
    style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"
  />
`,D={title:{type:String,default:"\u5217\u8868"},dataList:{type:Array,default:()=>[]},tableRef:{type:Object,default(){return{}}},loading:{type:Boolean,default:!1}};var R=y({name:"TableProBar",props:D,emits:["refresh"],setup(a,{emit:m,slots:n,attrs:b}){const v=u(),s=u([]),o=u("default"),r=u(!0),f=C(()=>t=>({background:t===o.value?E().epThemeColor:"",color:t===o.value?"#fff":"var(--el-text-color-primary)"}));function x(){r.value=!r.value,g(a.dataList,r.value)}function g(t,i){t.forEach(c=>{a.tableRef.toggleRowExpansion(c,i),c.children!==void 0&&c.children!==null&&g(c.children,i)})}const w={dropdown:()=>e(l("el-dropdown-menu"),{class:"translation"},{default:()=>[e(l("el-dropdown-item"),{style:f.value("large"),onClick:()=>o.value="large"},{default:()=>[p("\u677E\u6563")]}),e(l("el-dropdown-item"),{style:f.value("default"),onClick:()=>o.value="default"},{default:()=>[p("\u9ED8\u8BA4")]}),e(l("el-dropdown-item"),{style:f.value("small"),onClick:()=>o.value="small"},{default:()=>[p("\u7D27\u51D1")]})]})},k={reference:()=>e(d,{class:"cursor-pointer",icon:"setting",width:"16",color:"text_color_regular",onMouseover:t=>v.value=t.currentTarget},null)};return()=>{var t;return e(h,null,[L(e("div",B(b,{class:"pl-3 pr-3 pt-1 pb-1 bg-white dark:bg-dark",style:"margin-top:5px;width:100%","element-loading-svg":A,"element-loading-svg-view-box":"-10, -10, 50, 50"}),[e("div",{class:"flex justify-between w-full h-60px p-3"},[e("p",{class:"font-bold truncate",style:"line-height: 40px;"},[a.title]),e("div",{class:"flex items-center justify-around"},[e("div",{class:"flex mr-4"},[n==null?void 0:n.buttons()]),(t=a.tableRef)!=null&&t.size?e(h,null,[e(l("el-tooltip"),{effect:"dark",content:r.value?"\u6298\u53E0":"\u5C55\u5F00",placement:"top"},{default:()=>[e(d,{class:"cursor-pointer",icon:r.value?"unExpand":"expand",width:"16",color:"text_color_regular",onClick:()=>x()},null)]}),e(l("el-divider"),{direction:"vertical"},null)]):void 0,e(l("el-tooltip"),{effect:"dark",content:"\u5237\u65B0",placement:"top"},{default:()=>[e(d,{class:"cursor-pointer",icon:"refresh-right",width:"16",color:"text_color_regular",onClick:()=>m("refresh")},null)]}),e(l("el-divider"),{direction:"vertical"},null),e(l("el-tooltip"),{effect:"dark",content:"\u5BC6\u5EA6",placement:"top"},{default:()=>[e(l("el-dropdown"),{trigger:"click"},{default:()=>[e(d,{class:"cursor-pointer",icon:"density",width:"16",color:"text_color_regular"},null)],...w})]}),e(l("el-divider"),{direction:"vertical"},null),e(l("el-popover"),{width:"200",trigger:"click"},{default:()=>[e(l("el-checkbox-group"),{modelValue:s.value,"onUpdate:modelValue":i=>s.value=i},{default:()=>[e(l("el-checkbox"),{label:"\u5E8F\u53F7\u5217"},null),e(l("el-checkbox"),{label:"\u52FE\u9009\u5217"},null)]})],...k})]),e(l("el-tooltip"),{"popper-options":{modifiers:[{name:"computeStyles",options:{adaptive:!1,enabled:!1}}]},placement:"top","virtual-ref":v.value,"virtual-triggering":!0,trigger:"hover",content:"\u5217\u8BBE\u7F6E"},null)]),a.dataList.length>0?n.default({size:o.value,checkList:s.value}):e(l("el-empty"),{description:"\u6682\u65E0\u6570\u636E"},null)]),[[_("loading"),a.loading]])])}}});const I=T(R);export{I as T};
