import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t from"@momentum-ui/utils/lib/getColorValue";import*as r from"lit";import*as o from"lit/decorators.js";import*as s from"lit/directives/class-map.js";import*as i from"lit/directives/if-defined.js";import*as a from"lit/directives/style-map.js";import*as l from"mobx";var n,d,p={8637(e,t,r){r.d(t,{I:()=>o}),r(1821);var o,s=r(3876),i=r(7704),a=r(9609),l=r(7154),n=r(4084),d=r(2927),p=r(8899),c=r(4955),h=r(3517),m=r(7155),b=function(e,t,r,o){var s,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};!function(e){let t=class extends((0,i.yC)(d.LitElement)){constructor(){super(...arguments),this.label="Expand",this.checkedLabel="Collapse",this.hovered=!1,this.disabled=!1,this.checked=!1,this.visible=!0,this.focused=!1,this.disableClickToggle=!1,this.alignment="leading",this.dragger=!1,this.shadow=!1}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}static get styles(){return[n.A,m.A]}toggleGrabber(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("grabber-toggled",{detail:{checked:this.checked},bubbles:!0,composed:!0})))}handleMouseDown(){this.disableClickToggle||this.toggleGrabber()}handleKeyDown(e){this.disableClickToggle||(0,l.o)(e.code)&&(e.preventDefault(),this.toggleGrabber())}handleMouseEnter(){this.hovered=!0,this.dispatchHoverEvent()}handleMouseLeave(){this.hovered=!1,this.dispatchHoverEvent()}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}dispatchHoverEvent(){this.dispatchEvent(new CustomEvent("grabber-hover-changed",{bubbles:!0,composed:!0,detail:{hovered:this.hovered}}))}get collapsed(){return!this.checked}get grabberClassMap(){return{"md-grabber--active":this.checked,"md-grabber--disabled":this.disabled,"md-grabber--dragger":this.dragger,[`md-grabber--${this.alignment}`]:this.alignment,visible:this.visible||this.focused,"md-grabber--rtl":this.isRtl}}get grabberContainerClassMap(){return{[`${this.alignment}`]:!0,shadow:this.shadow&&(this.visible||this.checked)}}get isRtl(){return"rtl"===getComputedStyle(this).direction}get iconName(){if(this.dragger)return"list-menu-bold";if("leading"===this.alignment||"trailing"===this.alignment){const e=this.isRtl?"arrow-right-bold":"arrow-left-bold",t=this.isRtl?"arrow-left-bold":"arrow-right-bold";return this.checked?e:t}return this.checked?"arrow-up-bold":"arrow-down-bold"}get iconSize(){return this.dragger||!1===s.vz.isMomentumV2Enabled?"10":"12"}render(){return d.html`
        <div class="md-grabber__container ${(0,c.classMap)(this.grabberContainerClassMap)}">
          <button
            class="md-grabber ${(0,c.classMap)(this.grabberClassMap)}"
            part="grabber"
            aria-pressed=${this.checked}
            ?disabled=${this.disabled}
            tabindex="0"
            aria-label=${(0,h.ifDefined)(this.label.length?this.label:void 0)}
            type="button"
            role="button"
            @click=${this.handleMouseDown}
            @keydown=${this.handleKeyDown}
            @mouseenter=${this.handleMouseEnter}
            @mouseleave=${this.handleMouseLeave}
            @focus=${this.handleFocus}
            @blur=${this.handleBlur}
          >
            <md-icon name="${this.iconName}" size="${this.iconSize}" iconSet="momentumDesign"></md-icon>
          </button>
        </div>
      `}};b([(0,p.property)({type:String})],t.prototype,"label",void 0),b([(0,p.property)({type:String})],t.prototype,"checkedLabel",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"hovered",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"disabled",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"checked",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"visible",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"focused",void 0),b([(0,p.property)({type:Boolean,attribute:"disable-click-toggle"})],t.prototype,"disableClickToggle",void 0),b([(0,p.property)({type:String,reflect:!0})],t.prototype,"alignment",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"dragger",void 0),b([(0,p.property)({type:Boolean})],t.prototype,"shadow",void 0),t=b([(0,a.w)("md-grabber")],t),e.ELEMENT=t}(o||(o={}))},9500(t,r,o){var s,i;t.exports=(s={default:()=>e.default},i={},o.d(i,s),i)},3496(e,r,o){var s,i;e.exports=(s={default:()=>t.default},i={},o.d(i,s),i)},2927(e,t,o){var s,i;e.exports=(s={LitElement:()=>r.LitElement,css:()=>r.css,html:()=>r.html,nothing:()=>r.nothing},i={},o.d(i,s),i)},8899(e,t,r){var s,i;e.exports=(s={property:()=>o.property,query:()=>o.query,state:()=>o.state},i={},r.d(i,s),i)},4955(e,t,r){var o,i;e.exports=(o={classMap:()=>s.classMap},i={},r.d(i,o),i)},3517(e,t,r){var o,s;e.exports=(o={ifDefined:()=>i.ifDefined},s={},r.d(s,o),s)},1156(e,t,r){var o,s;e.exports=(o={styleMap:()=>a.styleMap},s={},r.d(s,o),s)},4980(e,t,r){var o,s;e.exports=(o={action:()=>l.action,computed:()=>l.computed,makeObservable:()=>l.makeObservable,observable:()=>l.observable},s={},r.d(s,o),s)}},c={};function h(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return p[e](r,r.exports,h),r.exports}h.m=p,n=[],h.O=(e,t,r,o)=>{if(!t){var s=1/0;for(d=0;d<n.length;d++){for(var[t,r,o]=n[d],i=!0,a=0;a<t.length;a++)(!1&o||s>=o)&&Object.keys(h.O).every(e=>h.O[e](t[a]))?t.splice(a--,1):(i=!1,o<s&&(s=o));if(i){n.splice(d--,1);var l=r();void 0!==l&&(e=l)}}return e}o=o||0;for(var d=n.length;d>0&&n[d-1][2]>o;d--)n[d]=n[d-1];n[d]=[t,r,o]},h.d=(e,t)=>{for(var r in t)h.o(t,r)&&!h.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{h as __webpack_require__};d={502:0,1745:0,3747:0,4545:0,4928:0,5369:0,6060:0,6920:0,8111:0,8442:0},h.C=e=>{var t,r,{__webpack_esm_ids__:o,__webpack_esm_modules__:s,__webpack_esm_runtime__:i}=e,a=0;for(t in s)h.o(s,t)&&(h.m[t]=s[t]);for(i&&i(h);a<o.length;a++)r=o[a],h.o(d,r)&&d[r]&&d[r][0](),d[o[a]]=0;h.O()},h.O.j=e=>0===d[e];import*as m from"../9609.js";h.C(m);import*as b from"../4084.js";h.C(b);import*as g from"../3305.js";h.C(g);import*as u from"../4739.js";h.C(u);import*as f from"../7154.js";h.C(f);import*as v from"../9773.js";h.C(v);import*as y from"../5983.js";h.C(y);import*as C from"../9488.js";h.C(C);import*as j from"../1821.js";h.C(j);import*as k from"../2364.js";h.C(k);import*as w from"../9938.js";h.C(w);import*as _ from"../4781.js";h.C(_);import*as x from"../5201.js";h.C(x);import*as M from"../5584.js";h.C(M);import*as E from"../8227.js";h.C(E);import*as O from"../2900.js";h.C(O);import*as $ from"../7704.js";h.C($);import*as B from"../3876.js";h.C(B);import*as D from"../7155.js";h.C(D);var L=h.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2900,7704,3876,7155],()=>h(8637));const R=(L=h.O(L)).I;export{R as Grabber};