import{r as t,c as e,h as i,g as l}from"./p-e964d29c.js";import{i as a}from"./p-d76c97aa.js";import{d as s}from"./p-7b48c7c5.js";import"./p-11286511.js";import"./p-4f46f4bb.js";const c={Loading:"Laddar","from server...":"från servern...","There are no":"Det finns inga","to display.":"att visa."},h=class{constructor(i){t(this,i),this.selectedChanged=e(this,"selectedChanged",7),this.selectable=!1,this.selected={}}componentWillLoad(){this.t=s.create({sv:c},this.element)}handleToggle(t){const e=this.selected;t.detail.checked?e[t.detail.id]=t.detail.value:delete e[t.detail.id],this.selectedChanged.emit(this.selected=e)}onChecked(t){this.selectedChanged.emit(t.detail.selected?{allSelected:!0}:{})}render(){const t=this.t;return[this.value?this.value.length>0?[i("table",null,i("thead",null,i("tr",null,this.selectable&&i("th",{class:"checkbox",color:"light"},i("smoothly-checkbox",{"select-all":!0})),this.header.filter(a).map((t=>i("th",{class:"right"==t.align?"right":"",color:"light"},t.name))))),i("slot",null))]:i("p",null,t("There are no")+" "+this.name+" "+t("to display.")):i("p",null,t("Loading")+" "+this.name+" "+t("from server..."))]}get element(){return l(this)}};h.style=".sc-ig-table-h{display:block;width:100%;max-width:90em;margin:auto;border:1px solid rgb(var(--smoothly-medium-color))}[hidden].sc-ig-table-h{display:none}.sc-ig-table-h>p.sc-ig-table{padding-left:1em}.sc-ig-table-h>table.sc-ig-table{width:100%;table-layout:fixed}.sc-ig-table-h>table.sc-ig-table>thead.sc-ig-table>tr.sc-ig-table{display:table-row;font-weight:bold;height:2em}.sc-ig-table-h>table.sc-ig-table>thead.sc-ig-table>tr.sc-ig-table>th.sc-ig-table{text-transform:capitalize}.sc-ig-table-h>table.sc-ig-table>thead.sc-ig-table>tr.sc-ig-table>*.sc-ig-table{display:table-cell;padding-right:.5em;padding-left:.3em;vertical-align:middle;position:-webkit-sticky;position:sticky;top:1.55cm;z-index:1;text-align:left}.sc-ig-table-h>table.sc-ig-table>thead.sc-ig-table>tr.sc-ig-table>th.right.sc-ig-table{text-align:right;padding-right:5.3em}.sc-ig-table-h>table.sc-ig-table>td.sc-ig-table{text-align:center}th.checkbox.sc-ig-table{width:2em}";export{h as ig_table}