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