import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-98dfb63a.js";import{i as isDefined}from"./model-52672ede.js";import{d as dist}from"./index-649488b2.js";import"./index-997ef4e9.js";import"./Token-0644b4fc.js";var sv={Loading:"Laddar","from server...":"från servern...","There are no":"Det finns inga","to display.":"att visa."};function create(e){return dist.create({sv:sv},e)}var styleCss=".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}";var IntergiroTable=function(){function e(e){registerInstance(this,e);this.selectedChanged=createEvent(this,"selectedChanged",7);this.selectable=false;this.selected={}}e.prototype.componentWillLoad=function(){this.t=create(this.element)};e.prototype.handleToggle=function(e){var t=this.selected;if(e.detail.checked)t[e.detail.id]=e.detail.value;else delete t[e.detail.id];this.selectedChanged.emit(this.selected=t)};e.prototype.onChecked=function(e){this.selectedChanged.emit(e.detail.selected?{allSelected:true}:{})};e.prototype.render=function(){var e=this.t;return[!this.value?h("p",null,e("Loading")+" "+this.name+" "+e("from server...")):this.value.length>0?[h("table",null,h("thead",null,h("tr",null,this.selectable&&h("th",{class:"checkbox",color:"light"},h("smoothly-checkbox",{"select-all":true})),this.header.filter(isDefined).map((function(e){return h("th",{class:e.align=="right"?"right":"",color:"light"},e.name)})))),h("slot",null))]:h("p",null,e("There are no")+" "+this.name+" "+e("to display."))]};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();IntergiroTable.style=styleCss;export{IntergiroTable as ig_table};