"use strict";(self.webpackChunkdotcms_ui=self.webpackChunkdotcms_ui||[]).push([[4440],{4440:(h,c,i)=>{i.r(c),i.d(c,{dot_select_button:()=>a});var s=i(55956),e=i(62254),d=i(90334);i(77717);class o extends e.L{constructor(){super(...arguments),this.disabled=!1,this.icon="",this.label="",this.shouldRenderRipple=!1,this.rippleHandlers=new d.R(()=>(this.shouldRenderRipple=!0,this.ripple))}renderRipple(){return this.shouldRenderRipple?e.h`
            <mwc-ripple
                .disabled="${this.disabled}"
                unbounded>
            </mwc-ripple>`:""}focus(){const n=this.buttonElement;n&&(this.rippleHandlers.startFocus(),n.focus())}blur(){const n=this.buttonElement;n&&(this.rippleHandlers.endFocus(),n.blur())}render(){return e.h`<button
        class="mdc-icon-button"
        aria-label="${this.label||this.icon}"
        ?disabled="${this.disabled}"
        @focus="${this.handleRippleFocus}"
        @blur="${this.handleRippleBlur}"
        @mousedown="${this.handleRippleMouseDown}"
        @mouseenter="${this.handleRippleMouseEnter}"
        @mouseleave="${this.handleRippleMouseLeave}"
        @touchstart="${this.handleRippleTouchStart}"
        @touchend="${this.handleRippleDeactivate}"
        @touchcancel="${this.handleRippleDeactivate}">
      ${this.renderRipple()}
    <i class="material-icons">${this.icon}</i>
    <span class="default-slot-container">
        <slot></slot>
    </span>
  </button>`}handleRippleMouseDown(n){const r=()=>{window.removeEventListener("mouseup",r),this.handleRippleDeactivate()};window.addEventListener("mouseup",r),this.rippleHandlers.startPress(n)}handleRippleTouchStart(n){this.rippleHandlers.startPress(n)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}(0,e._)([(0,e.p)({type:Boolean,reflect:!0})],o.prototype,"disabled",void 0),(0,e._)([(0,e.p)({type:String})],o.prototype,"icon",void 0),(0,e._)([(0,e.p)({type:String})],o.prototype,"label",void 0),(0,e._)([(0,e.q)("button")],o.prototype,"buttonElement",void 0),(0,e._)([(0,e.a)("mwc-ripple")],o.prototype,"ripple",void 0),(0,e._)([(0,e.i)()],o.prototype,"shouldRenderRipple",void 0),(0,e._)([(0,e.e)({passive:!0})],o.prototype,"handleRippleMouseDown",null),(0,e._)([(0,e.e)({passive:!0})],o.prototype,"handleRippleTouchStart",null);const p=e.c`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;user-select:none;width:48px;height:48px;padding:12px}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}:host{display:inline-block;outline:none;--mdc-ripple-color: currentcolor;-webkit-tap-highlight-color:transparent}:host([disabled]){pointer-events:none}:host,.mdc-icon-button{vertical-align:top}.mdc-icon-button{width:var(--mdc-icon-button-size, 48px);height:var(--mdc-icon-button-size, 48px);padding:calc( (var(--mdc-icon-button-size, 48px) - var(--mdc-icon-size, 24px)) / 2 )}.mdc-icon-button>i{position:absolute;top:0;padding-top:inherit}.mdc-icon-button i,.mdc-icon-button svg,.mdc-icon-button img,.mdc-icon-button ::slotted(*){display:block;width:var(--mdc-icon-size, 24px);height:var(--mdc-icon-size, 24px)}`;let l=class extends o{};l.styles=p,l=(0,e._)([(0,e.b)("mwc-icon-button")],l);const a=class{constructor(t){(0,s.r)(this,t),this.selected=(0,s.c)(this,"selected",7),this.value="",this.options=[]}render(){return(0,s.h)(s.H,null,this.options.map(t=>{const n=t.label.toLocaleLowerCase()===this.value.toLocaleLowerCase();return(0,s.h)("mwc-icon-button",{class:{active:n},icon:t.icon,label:t.label,disabled:t.disabled,onClick:()=>{this.setSelected(t)}})}))}setSelected(t){this.value=t.label,this.selected.emit(t.label.toLocaleLowerCase())}};a.style=".active{color:var(--color-main);pointer-events:none}"}}]);