import{h as a}from"./p-083180bf.js";import{c as t}from"./p-cef45012.js";import{g as l}from"./p-49b20dae.js";function o(o){const{states:e,data:r,callbacks:s,elements:i}=o,{columns:d,rows:n}=i,{show:p}=e,b=r.hiddenColumns&&r.hiddenColumns.split(",").map(Number),m={Table:{borderCollapse:"collapse",tableLayout:"fixed",width:"100%","& tbody tr":{borderBottom:"var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)","&:first-child":{borderTop:"var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)"}},"& th":{paddingBottom:"var(--sl-spacing-small)",textAlign:"left",fontWeight:"var(--sl-font-weight-semibold)",overflowWrap:"anywhere"},"& td":{padding:"var(--sl-spacing-small)",paddingLeft:"0",overflow:"hidden",textOverflow:"ellipsis"},["@media (max-width: "+r.mdBreakpoint+"px)"]:{"& thead":{display:"none"},"& tr":{display:"block",background:"inherit",border:"var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)",boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.1)",borderRadius:"var(--sl-border-radius-large)",padding:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)",marginBottom:"var(--sl-spacing-large)"},"& td":{display:"grid",borderTop:"none",padding:"0",marginBottom:"var(--sl-spacing-medium)","&:first-child":{textAlign:"left"},"&:before":{content:"attr(data-label)",whiteSpace:"nowrap"},"&:last-child":{marginBottom:"0"},"&.hidden:before":{content:"none"}}},[`@media (min-width: ${Boolean(n.length<2)?r.mdBreakpoint:r.smBreakpoint}px) and (max-width: ${r.mdBreakpoint}px)`]:{"& tbody":{display:"grid",gridTemplateColumns:"0.5fr 0.5fr",gap:"25px"}}},ButtonContainer:{display:"flex","justify-content":"flex-end","margin-top":"var(--sl-spacing-small)",...l({direction:"row",size:"var(--sl-spacing-small)"})},ButtonDisabled:{"&::part(base)":{opacity:"0.25"}}},c=t(m),g=c.toString();return"empty"===p?i.emptyElement:a("div",null,a("style",{type:"text/css"},g),a("table",{class:c.classes.Table},r.textOverrides.showLabels&&a("thead",null,a("tr",null,null==d?void 0:d.map((t=>a("th","string"==typeof t?null:{style:{width:"30px"}},t))))),a("tbody",null,"loading"===p&&i.loadingElement,"rows"===p&&(null==n?void 0:n.map(((t,l)=>a("tr",{style:{borderTop:r.textOverrides.showLabels||0!==l?"":"none"},part:"table-row"},t.map(((t,l)=>a("td","string"==typeof d[l]?{class:(null==b?void 0:b.includes(l))?"hidden":"","data-label":d[l]+":",style:{gridTemplateColumns:(null==b?void 0:b.includes(l))?"1fr":"0.5fr 0.5fr"}}:null,t))))))))),a("div",{class:c.classes.ButtonContainer,part:e.namespace+"-button-wrapper"},a("sl-button",{size:"small",disabled:!e.hasPrev,loading:"loading"===p,onClick:s.prevPage,exportparts:"base: secondarybutton-base",class:e.hasPrev?"":c.classes.ButtonDisabled},r.textOverrides.prevLabel),a("sl-button",{size:"small",loading:"loading"===p,disabled:!e.hasNext,onClick:s.nextPage,exportparts:"base: secondarybutton-base",class:e.hasNext?"":c.classes.ButtonDisabled},r.textOverrides.moreLabel)))}export{o as G}