import{r as t,c as s,h as i}from"./p-e964d29c.js";import{a as e,A as c}from"./p-578eb6e9.js";import"./p-112455b1.js";const o=class{constructor(i){t(this,i),this.updateAccounts=s(this,"updateAccounts",7),this.selected={}}componentWillLoad(){this.accountsFiltered||this.filterAccounts()}handleFilterChanged(t){this.filter=t.detail,t.stopPropagation()}filterAccounts(){const t=this.accounts&&(this.filter?e.filter(this.filter,this.accounts):[...this.accounts]);this.accountsFiltered=t}handleSelectedChanged(t){this.selected=t.detail}onCreate(t){this.updateAccounts.emit(t.detail)}render(){return[i("ig-filter",{template:c.template,filter:this.filter}),i("ig-accounts-actions",{whitelist:this.whitelist,selected:this.selected}),i("ig-accounts-table",{accounts:this.accountsFiltered,orders:this.orders,selected:this.selected,whitelist:this.whitelist}),i("ig-account-create-popup",{hidden:!0,onCreate:t=>this.onCreate(t)}),i("ig-accounts-footer",{accounts:this.accountsFiltered})]}static get watchers(){return{accounts:["filterAccounts"],filter:["filterAccounts"]}}};o.style=".sc-ig-accounts-h{display:block;width:100%;max-width:90em;margin:auto}ig-account-create-popup.sc-ig-accounts{bottom:3.5em;margin-right:2.5em}";export{o as ig_accounts}