import{r as t,c as s,h as c}from"./p-e964d29c.js";import{d as e}from"./p-0f5ca990.js";import{A as i}from"./p-3611030f.js";import"./p-112455b1.js";const a=class{constructor(c){t(this,c),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[c("payfunc-filter",{template:i.template,filter:this.filter}),c("payfunc-accounts-actions",{whitelist:this.whitelist,selected:this.selected}),c("payfunc-accounts-table",{accounts:this.accountsFiltered,orders:this.orders,selected:this.selected,whitelist:this.whitelist}),c("payfunc-account-create-popup",{hidden:!0,onCreate:t=>this.onCreate(t)}),c("payfunc-accounts-footer",{accounts:this.accountsFiltered})]}static get watchers(){return{accounts:["filterAccounts"],filter:["filterAccounts"]}}};a.style=".sc-payfunc-accounts-h{display:block;width:100%;max-width:90em;margin:auto}payfunc-account-create-popup.sc-payfunc-accounts{bottom:3.5em;margin-right:2.5em}";export{a as payfunc_accounts}