"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");require("../../utils/index.js");const d=require("../../utils/is.js");function u(o,e){o.forEach(r=>{e(r),r.children?.length&&u(r.children,e)})}const h=o=>{const e=l.ref(o),r=l.computed(()=>l.unref(e).every(t=>t.show));function c(){const t=l.unref(e);u(t,n=>{!n.disabled&&(n.show=!0)})}function i(){const t=l.unref(e);u(t,n=>{!n.disabled&&(n.show=!1)})}function f(){l.unref(r)?i():c()}function a(t,n){u(l.unref(e),s=>{s.key===t&&(s.show=d.isDef(n)?n:!s.show)})}function S(t){e.value=t}return{columnState:e,selectAll:c,unSelectAll:i,toggleSelect:a,setColumnState:S,isAllSelected:r,toggleSelectAll:f}};exports.useTableColumnState=h;
