/*!
 * Built with Stencil
 * By PostNord.
 */
import{transformTag as e,proxyCustomElement as t,HTMLElement as n,forceUpdate as o,h as c,Host as r}from"@stencil/core/internal/client";const a=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost()}mo;closeEvent=new CustomEvent("rowstate",{detail:!1});get hostElement(){return this}single=!1;transparent=!1;connectedCallback(){this.mo=new MutationObserver((()=>o(this.hostElement))),this.mo.observe(this.hostElement,{childList:!0,subtree:!0})}disconnectedCallback(){this.mo.disconnect()}handleSingleRow({detail:t}){if(!this.single)return;const n=t.element.closest(""+e("pn-accordion-row"));Array.from(this.hostElement.querySelectorAll(""+e("pn-accordion-row"))).forEach((e=>!e.isSameNode(n)&&e.dispatchEvent(this.closeEvent)))}render(){return c(r,{key:"d8cd9ef7bd0d93aafda0e6955a9ad35ec81d55ae",class:"pn-accordion","data-transparent":this.transparent},c("slot",{key:"43233bb6107dcc4608edb0086ef347d7c936556f"}))}static get style(){return`${e("pn-accordion")}{position:relative;background-color:#ffffff;display:flex;align-items:stretch;flex-direction:column;gap:0.25em}${e("pn-accordion")}[data-transparent]{background-color:transparent}${e("pn-accordion")}>${e("pn-accordion-row")}+${e("pn-accordion-row")}:after{content:"";position:absolute;top:-0.125em;left:0.25em;width:calc(100% - 0.5em);height:0;border-top:0.0625em solid #d3cecb}`}},[772,"pn-accordion",{single:[4],transparent:[4]},[[0,"togglerow","handleSingleRow"]]]),i=a,s=function(){"undefined"!=typeof customElements&&["pn-accordion"].forEach((t=>{"pn-accordion"===t&&(customElements.get(e(e(t)))||customElements.define(e(e(t)),a))}))};export{i as PnAccordion,s as defineCustomElement}