import{r as registerInstance,c as createEvent,h,H as Host}from"./index-B2f84Zog.js";import{d as downSmall}from"./index-D4ys0pep.js";var pdsAccordionCss=":host{display:block}details{--number-animation-transform-timing:200ms;border-radius:var(--pine-dimension-xs)}details pds-icon{-webkit-transform:scaleY(1);transform:scaleY(1)}details[open]{background-color:var(--pine-color-background-container)}details[open] summary{color:var(--pine-color-text-active);font-weight:var(--pine-font-weight-semi-bold)}details[open] summary pds-icon{-webkit-transform:scaleY(-1);transform:scaleY(-1)}summary{background-color:var(--pine-color-background-container);border-radius:var(--pine-dimension-xs);color:var(--pine-color-text-muted);font-family:var(--pine-font-family-body);font-size:var(--pine-font-size-body-md);font-weight:var(--pine-font-weight-medium);letter-spacing:var(--pine-letter-spacing);line-height:var(--pine-line-height-body);padding-block:calc(var(--pine-dimension-2xs) * 1.5);-webkit-padding-end:var(--pine-dimension-2xs);padding-inline-end:var(--pine-dimension-2xs);-webkit-padding-start:var(--pine-dimension-xs);padding-inline-start:var(--pine-dimension-xs);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}summary::-webkit-details-marker{display:none}summary:hover{background:var(--pine-color-background-container-hover);color:var(--pine-color-text);cursor:pointer}summary:focus-visible{outline:var(--pine-outline-focus);position:relative}summary pds-icon{-webkit-margin-start:auto;margin-inline-start:auto}.pds-accordion__body{-webkit-padding-after:calc(var(--pine-dimension-sm) + 2);padding-block-end:calc(var(--pine-dimension-sm) + 2);padding-inline:calc(var(--pine-dimension-2xs) * 1.5)}";var PdsAccordion=function(){function e(e){var n=this;registerInstance(this,e);this.pdsAccordionToggle=createEvent(this,"pdsAccordionToggle");this.isOpen=false;this.handleToggle=function(){n.isOpen=n.detailsEl.open};this.getOpenAttribute=function(){if(n.isOpen!==false){return{open:true}}return""}}e.prototype.handleOpenState=function(e){this.pdsAccordionToggle.emit(e)};e.prototype.componentDidLoad=function(){this.detailsEl.addEventListener("toggle",this.handleToggle)};e.prototype.render=function(){var e=this;return h(Host,{key:"dd45657cb2bfe2e26f3a2fcad6a941559f1968c5",class:"pds-accordion",id:this.componentId},h("details",Object.assign({key:"9dff1b1a3e4cdd308537c1e5f4020d6b74e4ac4e"},this.getOpenAttribute(),{ref:function(n){return e.detailsEl=n}}),h("summary",{key:"59152e8eece069bedd0109d1952dc1de95bc5d9a",part:"accordion-button"},h("slot",{key:"73881348e657d880c60a5420a758217789f03b0c",name:"label"},"Details"),h("pds-icon",{key:"dfe5c28de56ef76bda50f36a406ac2072ed4bd77",icon:downSmall,part:"accordion-icon"})),h("div",{key:"08d019728935164bb315035369044dd513a2c9db",part:"accordion-body",class:"pds-accordion__body"},h("slot",{key:"a67ce7ec1acf795827db51465b80c1ecad96a3e3"}))))};Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["handleOpenState"]}},enumerable:false,configurable:true});return e}();PdsAccordion.style=pdsAccordionCss;export{PdsAccordion as pds_accordion};
//# sourceMappingURL=pds-accordion.entry.js.map