import{r as w,s as c,ab as x,n as z,p as u,w as b,a as f,h,x as D,d as P,ac as C,H as T,g as O,m as j,o as M,v as m}from"./index-CekivK6a.js";import{t as k}from"./i18n-BgOmSzBT-Bv58MaPd.js";import{v as A,a as F,b as H,c as E,d as W,e as K}from"./table-settings-BYcS3vAt-IqaaDaXk.js";import{v as L}from"./label-ohY9ajP0-McX_xbR5.js";import{C as y}from"./keyboard-D6PoWr38-BGYQJqo4.js";const V=(t,n,e={})=>{j(t,"_allowMultiSort",n,Object.assign({defaultValue:!1},e))},v=["top","bottom","both"],q=(t,n)=>{b(t,"_paginationPosition",e=>typeof e=="string"&&v.includes(e),new Set([`PaginationPositionPropType {${v.join(", ")}`]),n,{defaultValue:"bottom"})},B=`@charset "UTF-8";
/*
* This file defines the layer order for all CSS layers used in KoliBri.
* The order is important as it determines the cascade priority.
*
* Layer order (lowest to highest priority):
* 1. kol-a11y - Accessibility defaults and requirements
* 2. kol-global - Global component styles and resets
* 3. kol-component - Component-specific styles
* 4. kol-theme-global - Theme-specific global styles
* 5. kol-theme-component - Theme-specific component styles
*/
@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;
/* forward the rem function */
/*
 * This file contains all rules for accessibility.
 */
@layer kol-a11y {
  :host {
    /*
                   * Minimum size of interactive elements.
                   */
    --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));
    /*
     * No element should be used without verifying the contrast ratio of its background and font colors.
     * By initially setting the background color to white and the font color to black,
     * the contrast ratio is ensured and explicit adjustment is forced.
     */
    color: black;
    background-color: white;
    /*
     * Verdana is an accessible font that can be used without requiring additional loading time.
     */
    font-family: Verdana;
    /*
     * Letter spacing is required for all texts.
     */
    letter-spacing: inherit;
    /*
     * Word spacing is required for all texts.
     */
    word-spacing: inherit;
    /*
     * Text should be aligned left by default to provide a predictable starting point.
     */
    text-align: left;
  }
  * {
    /*
     * This rule enables the word dividing for all texts. That is important for high zoom levels.
     */
    hyphens: auto;
    /*
     * This rule enables the word dividing for all texts. That is important for high zoom levels.
     */
    word-break: break-word;
  }
  /*
   * All interactive elements should have a minimum size of to-rem(44).
   */
  /* input:not([type='checkbox'], [type='radio'], [type='range']), */
  /* option, */
  /* select, */
  /* textarea, */
  button,
  .kol-input .input {
    min-width: var(--a11y-min-size);
    min-height: var(--a11y-min-size);
  }
  /*
   * Some interactive elements should not inherit the font-family and font-size.
   */
  a,
  button,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  input,
  option,
  select,
  textarea {
    /*
     * All elements should inherit the text color from his parent element.
     */
    color: inherit;
    /*
     * All elements should inherit the font family from his parent element.
     */
    font-family: inherit;
    /*
     * All elements should inherit the font size from his parent element.
     */
    font-size: inherit;
    /*
     * Letter spacing is required for all texts.
     */
    letter-spacing: inherit;
    /*
     * Word spacing is required for all texts.
     */
    word-spacing: inherit;
  }
  /**
  * Sometimes we need the semantic element for accessibility reasons,
  * but we don't want to show it.
  *
  * - https://www.a11yproject.com/posts/how-to-hide-content/
  */
  .visually-hidden {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }
}
@layer kol-global {
  /*
   * Dieses CSS stellt sicher, dass der Standard-Style
   * von A und Button resettet werden.
   */
  :is(a, button) {
    background-color: transparent;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    /* 100% needed for custom width from outside */
  }
  /*
   * Ensure elements with hidden attribute to be actually not visible
   * @see https://meowni.ca/hidden.is.a.lie.html
   */
  [hidden] {
    display: none !important;
  }
  .badge-text-hint {
    color: black;
    background-color: lightgray;
  }
}
@layer kol-global {
  :host {
    /*
     * The max-width is needed to prevent the table from overflowing the
     * parent node, if the table is wider than the parent node.
     */
    max-width: 100%;
    font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));
  }
  * {
    /*
     * We prefer to box-sizing: border-box for all elements.
     */
    box-sizing: border-box;
  }
  .kol-span {
    /* KolSpan is a layout component with icons in all directions and a label text in the middle. */
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: center;
    /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */
  }
  .kol-span__container {
    display: flex;
    align-items: center;
  }
  a,
  button {
    cursor: pointer;
  }
  .kol-span .kol-span__label--hide-label .kol-span__label {
    display: none;
  }
  /* Reset browser agent style. */
  button:disabled {
    color: unset;
  }
  .disabled label,
  .disabled:focus-within label,
  [aria-disabled=true],
  [aria-disabled=true]:focus,
  [disabled],
  [disabled]:focus {
    opacity: 0.5;
    outline: none;
    cursor: not-allowed;
  }
  [aria-disabled=true]:focus .kol-span,
  [disabled]:focus .kol-span {
    outline: none !important;
  }
}
@layer kol-component {
  :host {
    display: block;
  }
}
@layer kol-component {
  .kol-tooltip {
    display: contents;
  }
  .kol-tooltip__floating {
    opacity: 0;
    display: none;
    position: fixed;
    /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */
    top: 0;
    left: 0;
    /* Can be used to specify the tooltip-width from the outside. Unset by default.  */
    width: var(--kol-tooltip-width, max-content);
    min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));
    max-width: 90vw;
    max-height: 90vh;
    animation-direction: normal;
    /* Can be used to specify the animation duration from the outside. 250ms by default. */
    animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);
    animation-fill-mode: forwards;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
  }
  .kol-tooltip__floating.hide {
    animation-name: hideTooltip;
  }
  .kol-tooltip__floating.show {
    animation-name: showTooltip;
  }
  .kol-tooltip__arrow {
    transform: rotate(45deg);
    color: #000;
    background-color: #fff;
    position: absolute;
    z-index: 999;
    width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));
    height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));
  }
  .kol-tooltip__content {
    color: #000;
    background-color: #fff;
    position: relative;
    z-index: 1000;
  }
  @keyframes hideTooltip {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      display: none;
    }
  }
  @keyframes showTooltip {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
}
@layer kol-component {
  .kol-alert {
    display: grid;
  }
  .kol-alert__container {
    display: flex;
    place-items: center;
  }
  .kol-alert__container-content {
    flex-grow: 1;
  }
  .kol-alert__closer {
    /* Visible with forced colors */
    outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));
  }
  :host {
    display: inline-block;
  }
  .kol-button {
    display: flex;
    min-height: var(--a11y-min-size);
    font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));
    text-decoration-line: none;
  }
  .kol-button::before {
    /* Render zero-width character as first element to set the baseline correctly. */
    content: "​";
  }
  .kol-button__text {
    flex: 1 0 100%;
  }
  .kol-popover-button__button {
    display: inline-block;
  }
  .kol-popover-button__popover {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .kol-popover-button--inline .kol-popover-button__button {
    display: inline;
  }
  .kol-table-settings {
    background: #fff;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
  }
  .kol-table-settings .kol-popover-button__popover {
    background: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));
    border: 1px solid #d1d5db;
  }
  .kol-table-settings__columns-container {
    max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));
    margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));
    overflow: auto;
  }
  .kol-table-settings__columns {
    display: grid;
    gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));
    align-items: center;
    grid-auto-rows: min-content;
    grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;
  }
  .kol-table-settings__column {
    display: contents;
  }
  .kol-table {
    display: block;
    position: relative;
    max-width: 100%;
  }
  .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {
    /* @see https://remysharp.com/til/css/focus-ring-default-styles */
    outline: 5px auto Highlight;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: 2px;
  }
  .kol-table__scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
  }
  .kol-table__table {
    width: 100%;
  }
  .kol-table__caption {
    min-height: var(--a11y-min-size);
    padding-right: var(--a11y-min-size);
    text-align: start;
  }
  .kol-table__sort-button .kol-button {
    color: inherit;
  }
  .kol-table__sort {
    display: inline-flex;
    gap: 0.25rem;
    align-items: center;
  }
  .kol-table__sort-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .kol-table__body {
    text-align: left;
  }
  .kol-table__body .kol-button__text {
    justify-items: start;
  }
  .kol-table__cell--align-left {
    text-align: left;
  }
  .kol-table__cell--align-left .kol-button__text {
    align-items: start;
  }
  .kol-table__cell--align-center {
    text-align: center;
  }
  .kol-table__cell--align-center .kol-button__text {
    align-items: center;
  }
  .kol-table__cell--align-right {
    text-align: right;
  }
  .kol-table__cell--align-right .kol-button__text {
    align-items: end;
  }
  .kol-table__cell--selection {
    width: var(--a11y-min-size);
    height: var(--a11y-min-size);
    white-space: nowrap;
  }
  .kol-table__spacer {
    display: none;
  }
  .kol-table__selection-label {
    display: flex;
    position: relative;
    width: var(--a11y-min-size);
    height: var(--a11y-min-size);
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .kol-table__selection-label--disabled {
    cursor: not-allowed;
  }
  .kol-table__selection-icon {
    display: block;
    position: absolute;
    inset: auto;
    z-index: 1;
  }
  .kol-table__selection-input {
    border-style: solid;
    margin: 0;
    appearance: none;
    cursor: pointer;
  }
  .kol-table__selection-input:disabled {
    cursor: not-allowed;
  }
  .kol-table__selection-input:before {
    content: "";
  }
  .kol-table__selection-input--checkbox {
    background-color: rgb(255, 255, 255);
    display: flex;
    position: relative;
    width: calc(var(--a11y-min-size) / 2);
    height: calc(var(--a11y-min-size) / 2);
    border-width: 2px;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
  }
  .kol-table__selection-input--radio {
    border-radius: 100%;
    display: flex;
    width: 1.5em;
    min-width: 1.5em;
    height: 1.5em;
    min-height: 1.5em;
    padding: 0;
    border-width: 2px;
  }
  .kol-table__selection-input--radio:before {
    border-radius: 100%;
    width: 0.75em;
    height: 0.75em;
    margin: auto;
  }
  .kol-table__selection-input--radio:checked:before {
    background-color: #000;
  }
  @media (forced-colors: active) {
    .kol-table__selection-input--radio:checked:before {
      /* Give it a visible background in forced colors mode */
      background-color: selectedItem !important;
    }
  }
  .kol-alert {
    display: grid;
  }
  .kol-alert__container {
    display: flex;
    place-items: center;
  }
  .kol-alert__container-content {
    flex-grow: 1;
  }
  .kol-alert__closer {
    /* Visible with forced colors */
    outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));
  }
  .kol-form-field {
    display: grid;
  }
  .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {
    cursor: pointer;
  }
  .kol-form-field--disabled .kol-form-field__label {
    opacity: 0.5;
  }
  .kol-form-field--required .kol-form-field__label-text::after {
    content: "*"/"";
  }
  .kol-form-field--disabled .kol-form-field__hint {
    opacity: 0.5;
  }
  .kol-form-field--required .kol-form-field__tooltip .span-label::after {
    content: "*"/"";
  }
  .kol-input-container {
    background-color: transparent;
    display: grid;
    width: 100%;
    min-width: var(--a11y-min-size);
    min-height: var(--a11y-min-size);
    align-items: center;
    grid-template-columns: 1fr;
  }
  .kol-input-container:has(> .kol-input-container__adornment--start:not(:empty)) {
    grid-template-columns: auto 1fr;
  }
  .kol-input-container:has(> .kol-input-container__adornment--end:not(:empty)) {
    grid-template-columns: 1fr auto;
  }
  .kol-input-container:has(> .kol-input-container__adornment--start:not(:empty)):has(> .kol-input-container__adornment--end:not(:empty)) {
    grid-template-columns: auto 1fr auto;
  }
  .kol-input-container__container {
    position: relative;
  }
  .kol-input-container__adornment {
    display: flex;
    align-items: center;
  }
  .kol-input-container__adornment .kol-icon {
    display: grid;
    height: var(--a11y-min-size);
    place-items: center;
  }
  .kol-select {
    background-color: transparent;
    width: 100%;
  }
  .kol-select:not(:disabled) {
    cursor: pointer;
  }
  .kol-select:not([multiple], [size]) {
    height: 2.75em;
  }
  .kol-select:focus {
    outline: none;
  }
  .kol-select__option:checked::before {
    content: "✓ ";
  }
  .kol-select {
    /* needed hack for vertical alignment */
  }
  .kol-select[multiple] option {
    padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;
  }
  .kol-pagination {
    display: flex;
    gap: calc(16 * 1rem / var(--kolibri-root-font-size, 16));
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
  @media (max-width: 1024px) {
    .kol-pagination {
      flex-direction: column;
    }
  }
  .kol-pagination__navigation-list {
    display: inline-flex;
    margin: 0;
    padding: 0;
    gap: 0.5em;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
  }
  .kol-pagination__separator:before {
    content: "•••";
  }
  .kol-pagination__page-size-select .kol-form-field-select {
    align-items: center;
    grid-template-columns: 1fr max-content;
  }
  .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {
    display: grid;
    place-items: center;
  }
  @media (min-width: 1024px) {
    .kol-table-stateful__pagination, .kol-table-stateful__pagination-wrapper {
      grid-auto-flow: column;
    }
  }
}`,I=[10,20,50,100],S=t=>t===!0||t===""||typeof t=="object"&&t!==null,N=class{constructor(t){w(this,t),this.catchRef=n=>{this.tableWcRef=n},this.sortData=[],this.showPagination=!1,this.pageStartSlice=0,this.pageEndSlice=10,this.disableSort=!1,this._paginationPosition="bottom",this.state={_allowMultiSort:!1,_data:[],_dataFoot:[],_headers:{horizontal:[],vertical:[]},_label:"",_minWidth:"auto",_pagination:{_page:1,_pageSize:10,_max:0},_sortedData:[],_paginationPosition:"bottom",_hasSettingsMenu:!1},this.handlePagination={onClick:(n,e)=>{var i;typeof((i=this.state._pagination._on)===null||i===void 0?void 0:i.onClick)=="function"&&this.state._pagination._on.onClick(n,e),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePage:(n,e)=>{var i;typeof((i=this.state._pagination._on)===null||i===void 0?void 0:i.onChangePage)=="function"&&this.state._pagination._on.onChangePage(n,e),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_page:e}))},onChangePageSize:(n,e)=>{var i;typeof((i=this.state._pagination._on)===null||i===void 0?void 0:i.onChangePageSize)=="function"&&this.state._pagination._on.onChangePageSize(n,e),c(this,"_pagination",Object.assign(Object.assign({},this.state._pagination),{_pageSize:e})),c(this,"_pageSize",e)}},this.onSelectionChange=n=>{n.stopPropagation()},this.updateSortedData=()=>{if(this.disableSort){c(this,"_sortedData",this.state._data);return}const n=[...this.state._data];this.sortData.length>0&&n.sort((e,i)=>{for(let a=0;a<this.sortData.length;a++){const s=this.sortData[a],r=s.compareFn(e,i,s.direction);if(r!==0)return s.direction==="ASC"?r:-r}return 0}),c(this,"_sortedData",n)}}validateAllowMultiSort(t){V(this,t,{defaultValue:!1})}validateData(t){A(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validateDataFoot(t){F(this,t,{afterPatch:()=>{setTimeout(this.updateSortedData)}})}validatePaginationPosition(t){q(this,t)}validateHasSettingsMenu(t){H(this,t)}changeCellSort(t){var n;if(typeof t.compareFn=="function"){!this.state._allowMultiSort&&t.key!==((n=this.sortData[0])===null||n===void 0?void 0:n.key)&&(this.sortData=[]);const e=this.sortData.findIndex(i=>i.key===t.key);if(e>=0){const i=this.sortData[e];switch(i.direction){case"ASC":i.direction="DESC";break;case"DESC":this.sortData.splice(e,1);break;default:i.direction="ASC";break}}else t.key&&this.sortData.push({label:t.label,key:t.key,compareFn:t.compareFn,direction:"ASC"});this.updateSortedData()}}validateHeaders(t){x(t,()=>{M(t,()=>{try{t=u(t)}catch{}b(this,"_headers",n=>typeof n=="object"&&n!==null,new Set(["KoliBriTableHeaders"]),t,{hooks:{beforePatch:n=>{var e,i,a,s;const r=g=>{let p=!1;this.sortData=[],g.forEach(o=>{if(typeof o.compareFn=="function"&&!o.key){m("[KolTableStateful] A sortable column requires the 'key' property.");return}const l=o.key;if(!l)return;const _=o.sortDirection;(_==="ASC"||_==="DESC")&&typeof o.compareFn=="function"&&((this.state._allowMultiSort||this.sortData.length===0)&&this.sortData.push({label:o.label,key:l,compareFn:o.compareFn,direction:_}),p=!0)}),p&&setTimeout(()=>this.updateSortedData())},d=n;(e=d.horizontal)===null||e===void 0||e.forEach(r),(i=d.vertical)===null||i===void 0||i.forEach(r),d.horizontal&&d.vertical&&((a=d.horizontal)===null||a===void 0?void 0:a.length)>0&&((s=d.vertical)===null||s===void 0?void 0:s.length)>0&&(this.disableSort=!0,m("Table: You can not sort the table data, if horizontal and vertical headers are defined at the same time. (https://github.com/public-ui/kolibri/issues/2372)"))}}})})})}validateLabel(t){L(this,t,{required:!0})}validateMinWidth(t){z(this,"_minWidth",t,{defaultValue:void 0})}validateSelection(t){E(this,t)}validateOn(t){W(this,t)}validateTableSettings(t){K(this,t)}validatePagination(t){try{t=u(t)}catch{}this.showPagination=S(t),b(this,"_pagination",S,new Set(["boolean","KoliBriTablePagination"]),t,{defaultValue:{_page:1,_pageSize:10,_max:0}})}componentDidLoad(){var t;(t=this.tableWcRef)===null||t===void 0||t.addEventListener(f.selectionChange,this.onSelectionChange)}disconnectedCallback(){var t;(t=this.tableWcRef)===null||t===void 0||t.removeEventListener(f.selectionChange,this.onSelectionChange)}componentWillLoad(){this.validateAllowMultiSort(this._allowMultiSort),this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaders(this._headers),this.validateLabel(this._label),this.validateMinWidth(this._minWidth),this.validateOn(this._on),this.validatePagination(this._pagination),this.validatePaginationPosition(this._paginationPosition),this.validateSelection(this._selection),this.validateTableSettings(this._tableSettings),this.validateHasSettingsMenu(this._hasSettingsMenu)}selectDisplayedData(t,n,e){return typeof n=="number"&&n>0&&typeof e=="number"&&e>0?(this.pageStartSlice=n*(e-1),this.pageEndSlice=n*e>t.length?t.length:n*e,t.slice(this.pageStartSlice,this.pageEndSlice)):(this.pageStartSlice=0,this.pageEndSlice=t.length,t)}renderPagination(t){const n=k("kol-table-pagination-label",{placeholders:{label:`${this.state._label} (${k(`kol-pagination-position-${t}`)})`}});return h("div",{class:`kol-table-stateful__pagination kol-table-stateful__pagination--${this.state._paginationPosition}`},h("div",{class:"kol-table-stateful__pagination-wrapper"},h(D,{class:"test",_boundaryCount:this.state._pagination._boundaryCount,_customClass:this.state._pagination._customClass,_on:this.handlePagination,_page:this.state._pagination._page,_pageSize:this.state._pagination._pageSize,_pageSizeOptions:this.state._pagination._pageSizeOptions||I,_siblingCount:this.state._pagination._siblingCount,_tooltipAlign:"bottom",_max:this.state._pagination._max||this.state._pagination._max||this.state._data.length,_label:n})))}getHeaderCellSortState(t){if(!this.disableSort&&typeof t.compareFn=="function"){if(t.key){const n=this.sortData.find(e=>e.key===t.key);if(n?.direction)return n.direction}return"NOS"}}getHeaderCellSortOrder(t){if(!this.disableSort&&this.state._allowMultiSort&&typeof t.compareFn=="function"&&t.key){const n=this.sortData.findIndex(e=>e.key===t.key);if(n>=0)return n+1}}handleSort({key:t}){const n=[...(this.state._headers.horizontal||[]).flat(),...(this.state._headers.vertical||[]).flat()].find(e=>e.key===t);n&&this.changeCellSort(n)}getSelectedData(t){var n;const e=this.state._selection;if(e){const i=(n=e.keyPropertyName)!==null&&n!==void 0?n:"id",a=new Set(t.map(String)),s=this.state._sortedData.filter(r=>a.has(String(r[i])));if(i)return s}return null}handleSelectionChange(t,n){var e;const i=this.state._selection;i&&(this.state=Object.assign(Object.assign({},this.state),{_selection:Object.assign(Object.assign({},i),{selectedKeys:n})}));const a=this.getSelectedData(n);typeof((e=this.state._on)===null||e===void 0?void 0:e[y.onSelectionChange])=="function"&&this.state._on[y.onSelectionChange](t,a),this.host&&P(this.host,f.selectionChange,a)}async getSelection(){var t;const n=((t=this.state._selection)===null||t===void 0?void 0:t.selectedKeys)||[];return this.getSelectedData(n)}render(){var t,n,e,i,a,s;const r=this.selectDisplayedData(this.state._sortedData,this.showPagination?(n=(t=this.state._pagination)===null||t===void 0?void 0:t._pageSize)!==null&&n!==void 0?n:10:this.state._sortedData.length,this.state._pagination._page||1),d=this._paginationPosition==="top"||this._paginationPosition==="both"?this.renderPagination("top"):null,g=this._paginationPosition==="bottom"||this._paginationPosition==="both"?this.renderPagination("bottom"):null,p={horizontal:(i=(e=this.state._headers.horizontal)===null||e===void 0?void 0:e.map(o=>o.map(l=>Object.assign(Object.assign({},l),{sortDirection:this.getHeaderCellSortState(l),sortOrder:this.getHeaderCellSortOrder(l)}))))!==null&&i!==void 0?i:[],vertical:(s=(a=this.state._headers.vertical)===null||a===void 0?void 0:a.map(o=>o.map(l=>Object.assign(Object.assign({},l),{sortDirection:this.getHeaderCellSortState(l),sortOrder:this.getHeaderCellSortOrder(l)}))))!==null&&s!==void 0?s:[]};return h(T,{key:"41a7f056f06c1f024d5832008610ac9bd18fb79b",class:"kol-table-stateful"},this.pageEndSlice>0&&this.showPagination&&d,h(C,{key:"cc755ff1c2b50cd4df6cd6cdb58b367dd1c918d5",ref:this.catchRef,_data:r,_headerCells:p,_label:this.state._label,_dataFoot:this.state._dataFoot,_minWidth:this.state._minWidth,_on:{onSort:(o,l)=>{this.handleSort(l)},onSelectionChange:(o,l)=>{this.handleSelectionChange(o,l)}},_selection:this.state._selection,_tableSettings:this.state._tableSettings,_hasSettingsMenu:this.state._hasSettingsMenu}),this.pageEndSlice>0&&this.showPagination&&g)}get host(){return O(this)}static get watchers(){return{_allowMultiSort:["validateAllowMultiSort"],_data:["validateData"],_dataFoot:["validateDataFoot"],_paginationPosition:["validatePaginationPosition"],_hasSettingsMenu:["validateHasSettingsMenu"],_headers:["validateHeaders"],_label:["validateLabel"],_minWidth:["validateMinWidth"],_selection:["validateSelection"],_on:["validateOn"],_tableSettings:["validateTableSettings"],_pagination:["validatePagination"]}}};N.style={default:B};export{N as kol_table_stateful};
//# sourceMappingURL=kol-table-stateful.entry-DLig_eON.js.map
