var o=r=>{throw TypeError(r)};var m=(r,t,e)=>t.has(r)||o("Cannot "+e);var i=(r,t,e)=>(m(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>t.has(r)?o("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),h=(r,t,e,n)=>(m(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e);import{bg as g,S as y,bh as d}from"./BxiWQxwE.js";var s,a;const u=class u{constructor(t){l(this,s,null);l(this,a,null);h(this,s,t),h(this,a,g.from(t.sections??[]).select(e=>y.create(e)))}get alias(){return i(this,s).alias??null}get authLevel(){return i(this,s).authLevel??d.Select}get canonicalUrl(){return i(this,s).canonicalUrl??null}get categoryStyleId(){return i(this,s).categoryStyleId}get categoryTypeId(){return i(this,s).categoryTypeId}get customId(){return i(this,s).customId??null}get id(){return i(this,s).id}get isDefault(){return i(this,s).isDefault??!1}get isExternal(){return i(this,s).isExternal??!1}get isExtranet(){return i(this,s).isExtranet??!1}get isLink(){return i(this,s).isLink??!1}get isLoginPage(){return i(this,s).isLoginPage??!1}get isShown(){return i(this,s).isShown??!1}get isSearchPage(){return i(this,s).isSearchPage??!1}get isSitemap(){return i(this,s).isSitemap??!1}get items(){return this.sections.selectMany(t=>t.items)}get link(){return i(this,s).link??"/"}get metaDescription(){return i(this,s).metaDescription??null}get metaKeywords(){return i(this,s).metaKeywords??null}get metaTitle(){return i(this,s).metaTitle??null}get name(){return i(this,s).name}get noIndex(){return i(this,s).noIndex??!1}get breadcrumbs(){return i(this,s).breadcrumbs??[]}get relations(){return i(this,s).relations??[]}get sections(){return i(this,a)}static create(t){return t==null?null:new u(t)}item(t){return typeof t=="number"?this.sections.selectMany(e=>e.items.where(n=>n.id===t)).first():this.sections.selectMany(e=>e.items.where(n=>n.alias===t)).first()}itemByAlias(t){return this.items.first(e=>e.alias===t)}itemByType(t){return this.items.first(e=>e.type===t)}itemByTemplate(t){return this.items.first(e=>e.templateId===t)}itemsByAlias(t){return this.items.where(e=>e.alias===t)}itemsByType(t){return this.items.where(e=>e.type===t)}itemsByTemplate(t){return this.items.where(e=>e.templateId===t)}toJson(){return{alias:this.alias,authLevel:this.authLevel,breadcrumbs:this.breadcrumbs,canonicalUrl:this.canonicalUrl,categoryStyleId:this.categoryStyleId,categoryTypeId:this.categoryTypeId,customId:this.customId,id:this.id,isDefault:this.isDefault,isExternal:this.isExternal,isExtranet:this.isExtranet,isLink:this.isLink,isLoginPage:this.isLoginPage,isShown:this.isShown,isSearchPage:this.isSearchPage,isSitemap:this.isSitemap,link:this.link,metaDescription:this.metaDescription,metaKeywords:this.metaKeywords,metaTitle:this.metaTitle,name:this.name,noIndex:this.noIndex,relations:this.relations,sections:i(this,a).select(t=>t.toJson()).toArray()}}valueOf(){return this.toJson()}};s=new WeakMap,a=new WeakMap;let c=u;export{c as C};
