{"version":3,"file":"mapState-helper.mjs","sources":["../../../../../../../packages/components/table/src/table-footer/mapState-helper.ts"],"sourcesContent":["import { computed, getCurrentInstance } from 'vue'\n\nimport type { Table } from '../table/defaults'\n\nfunction useMapState<T>() {\n  const instance = getCurrentInstance()\n  const table = instance.parent as Table<T>\n  const store = table.store\n  const leftFixedLeafCount = computed(() => {\n    return store.states.fixedLeafColumnsLength.value\n  })\n  const rightFixedLeafCount = computed(() => {\n    return store.states.rightFixedColumns.value.length\n  })\n  const columnsCount = computed(() => {\n    return store.states.columns.value.length\n  })\n  const leftFixedCount = computed(() => {\n    return store.states.fixedColumns.value.length\n  })\n  const rightFixedCount = computed(() => {\n    return store.states.rightFixedColumns.value.length\n  })\n\n  return {\n    leftFixedLeafCount,\n    rightFixedLeafCount,\n    columnsCount,\n    leftFixedCount,\n    rightFixedCount,\n    columns: store.states.columns,\n  }\n}\n\nexport default useMapState\n"],"names":[],"mappings":";;AAIA,uBAA0B;AACxB,QAAM,WAAW;AACjB,QAAM,QAAQ,SAAS;AACvB,QAAM,QAAQ,MAAM;AACpB,QAAM,qBAAqB,SAAS,MAAM;AACxC,WAAO,MAAM,OAAO,uBAAuB;AAAA;AAE7C,QAAM,sBAAsB,SAAS,MAAM;AACzC,WAAO,MAAM,OAAO,kBAAkB,MAAM;AAAA;AAE9C,QAAM,eAAe,SAAS,MAAM;AAClC,WAAO,MAAM,OAAO,QAAQ,MAAM;AAAA;AAEpC,QAAM,iBAAiB,SAAS,MAAM;AACpC,WAAO,MAAM,OAAO,aAAa,MAAM;AAAA;AAEzC,QAAM,kBAAkB,SAAS,MAAM;AACrC,WAAO,MAAM,OAAO,kBAAkB,MAAM;AAAA;AAG9C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,MAAM,OAAO;AAAA;AAAA;;;;"}