System.register(["./p-45cf2585.system.js"],(function(r){"use strict";var o,e,a,i;return{setters:[function(r){o=r.r;e=r.h;a=r.H;i=r.g}],execute:function(){var d=":host{--sizing-max-width-default:352px;display:inline-block}:host [popover]{background-color:var(--pine-color-white);border:1px solid var(--pine-color-gray-200);border-radius:var(--pine-border-radius-125);-webkit-box-shadow:var(--pine-box-shadow-200);box-shadow:var(--pine-box-shadow-200);margin:0;max-width:var(--sizing-max-width-default);padding:var(--pine-spacing-300);position:fixed}:host button{--border-radius-default:var(--pine-border-radius-round);--border-width-default:var(--pine-border-width-thin);--border-width-unstyled:var(--pine-border-radius-0);--color-background-secondary-hover:var(--pine-color-grey-050);--color-border-secondary-default:var(--pine-color-grey-400);--color-border-secondary-disabled:var(--pine-color-grey-300);--color-border-secondary-focus:var(--pine-color-grey-300);--color-border-secondary-hover:var(--pine-color-grey-500);--color-text-secondary-default:var(--pine-color-grey-800);--color-text-secondary-disabled:var(--pine-color-grey-400);--color-outline-secondary:var(--pine-color-purple-300);--color-border-disabled:var(--color-border-secondary-disabled);--color-border-focus:var(--color-border-secondary-focus);--color-border-hover:var(--color-border-secondary-hover);--color-border-default:var(--color-border-secondary-default);--color-text-default:var(--color-text-secondary-default);--color-text-disabled:var(--color-text-secondary-disabled);--color-outline:var(--color-outline-secondary);--spacing-padding-block:var(--pine-spacing-100);--spacing-padding-inline:var(--pine-spacing-200);-ms-flex-align:center;align-items:center;background-color:var(--color-background-default);border:var(--border-width-default) solid var(--color-border-default);border-radius:var(--pine-border-radius-circle);color:var(--color-text-default);display:-ms-flexbox;display:flex;font-family:var(--pine-font-family-greet);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-body-medium);line-height:var(--pine-line-height-150);min-height:40px;padding:var(--spacing-padding-block) var(--spacing-padding-inline)}:host button:hover{background-color:var(--color-background-secondary-hover)}";var t=d;var n=r("pds_popover",function(){function r(r){o(this,r);this.active=false;this.popoverTargetAction="show";this.popoverType="auto";this.componentId=undefined;this.text=undefined;this.maxWidth=352;this.placement="right"}r.prototype.componentWillRender=function(){this.handlePopoverPositioning()};r.prototype.handleClick=function(){this.active=!this.active};r.prototype.handleScroll=function(){if(this.active){this.handlePopoverPositioning()}};r.prototype.handlePopoverPositioning=function(){var r=this.el.shadowRoot.querySelector(".pds-popover__trigger");var o=this.el.shadowRoot.querySelector("div[popover]");if(!r||!o)return;var e=r.getBoundingClientRect();var a=o.getBoundingClientRect();var i=0;var d=0;var t=8;switch(this.placement){case"top":i=e.top-a.height-t;d=e.left;break;case"right":i=e.top;d=e.right+t;break;case"bottom":i=e.bottom+t;d=e.left;break;case"left":i=e.top;d=e.left-a.width-t;break}o.style.top="".concat(i,"px");o.style.left="".concat(d,"px")};r.prototype.render=function(){return e(a,{key:"7a21719bb6f13f435cae77f6b2c7c2eefb36c977"},e("button",{key:"707c94e2462fe230a777d61899b902c84feaa09c",class:"pds-popover__trigger",popoverTarget:this.componentId,popoverTargetAction:this.popoverTargetAction,onClick:this.handleClick},this.text),e("div",{key:"703d21dd5f3caadb8c0d097849f691d2d4407358",class:"pds-popover ".concat(this.active?"pds-popover--active":""),id:this.componentId,popover:this.popoverType,style:{maxWidth:"".concat(this.maxWidth,"px")}},e("slot",{key:"42ef680b5850d62f50f1e6cfb1587c3d5b6db0d4"})))};Object.defineProperty(r.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return r}());n.style=t}}}));
//# sourceMappingURL=p-cbf2acbd.system.entry.js.map