import*as t from"lit";import*as e from"lit/decorators.js";import*as o from"lit/directives/class-map.js";import*as r from"lit/directives/if-defined.js";import*as a from"lit/directives/style-map.js";var s,i,c={1869(t,e,o){o.d(e,{i:()=>d,p:()=>h}),o(5983);var r=o(7704),a=o(9609),s=o(2050),i=o(4084),c=o(2927),p=o(8899),m=o(4955),n=o(887),l=function(t,e,o,r){var a,s=arguments.length,i=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,r);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(i=(s<3?a(i):s>3?a(e,o,i):a(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i};const h=["auto","left","right","top","bottom"];var d;!function(t){let e=class extends((0,r.dY)(c.LitElement)){constructor(){super(...arguments),this.message="",this.actionname="Next",this.hidebutton=!1,this.placement="auto",this.show=!1,this.color="default",this.slotContent=null}connectedCallback(){super.connectedCallback()}notifyCoachCreate(){this.dispatchEvent(new CustomEvent("coach-create",{bubbles:!0,composed:!0,detail:{placement:this.placement,reference:this.reference,popper:this.popper}}))}coachAction(){this.dispatchEvent(new CustomEvent("coach-action",{bubbles:!0,composed:!0,detail:{popper:this.popper}}))}handleSlotChange(t){const e=t.target;if(e){const t=e.assignedElements({flatten:!0});t.length&&(this.slotContent=t)}}update(t){var e;super.update(t),t.has("show")&&this.show&&(this.setFocusableElements(),(null===(e=this.focusableElements)||void 0===e?void 0:e.length)&&this.focusableElements[0].focus())}get coachWrapClassMap(){return{"md-coachmark--active":!!this.show}}get coachClassMap(){return{[`md-coachmark__popper--${this.placement}`]:!!this.placement,[`md-coachmark__popper--${this.color}`]:!!this.color}}static get styles(){return[i.A,n.A]}coachmarkContentTemplate(){return c.html`
        <div class="md-coachmark__content">
          ${this.message?this.message:c.html` <slot name="coachmark-content" @slotchange=${this.handleSlotChange}></slot> `}
          <div class="md-coachmark__action">
            ${this.hidebutton?c.html` <slot name="coachmark-action"></slot> `:c.html` <md-button variant="secondary" @button-click=${this.coachAction}>${this.actionname}</md-button> `}
          </div>
        </div>
      `}wrappedCoachmarkContentTemplate(){const t=(0,s.QZ)("md-theme",this);return"momentumV2"===(null==t?void 0:t.theme)?c.html`
          <md-theme theme="momentumV2" ?darkTheme=${!t.darkTheme}>
            ${this.coachmarkContentTemplate()}
          </md-theme>
        `:this.coachmarkContentTemplate()}render(){return c.html`
        <div class="md-coachmark ${(0,m.classMap)(this.coachWrapClassMap)}">
          <div class="md-coachmark__popper ${(0,m.classMap)(this.coachClassMap)}" tabindex="0">
            ${this.wrappedCoachmarkContentTemplate()}
            <div id="arrow" class="md-coachmark__arrow" data-popper-arrow></div>
          </div>
          <div class="md-coachmark__reference" @click=${()=>this.notifyCoachCreate()} aria-describedby="coachmark">
            <slot></slot>
          </div>
        </div>
      `}};l([(0,p.property)({type:String})],e.prototype,"message",void 0),l([(0,p.property)({type:String})],e.prototype,"actionname",void 0),l([(0,p.property)({type:Boolean})],e.prototype,"hidebutton",void 0),l([(0,p.property)({type:String})],e.prototype,"placement",void 0),l([(0,p.property)({type:Boolean})],e.prototype,"show",void 0),l([(0,p.property)({type:String})],e.prototype,"color",void 0),l([(0,p.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),l([(0,p.query)(".md-coachmark__reference")],e.prototype,"reference",void 0),e=l([(0,a.w)("md-coachmark")],e),t.ELEMENT=e}(d||(d={}))},2927(e,o,r){var a,s;e.exports=(a={LitElement:()=>t.LitElement,css:()=>t.css,html:()=>t.html,nothing:()=>t.nothing},s={},r.d(s,a),s)},8899(t,o,r){var a,s;t.exports=(a={property:()=>e.property,query:()=>e.query,state:()=>e.state},s={},r.d(s,a),s)},4955(t,e,r){var a,s;t.exports=(a={classMap:()=>o.classMap},s={},r.d(s,a),s)},3517(t,e,o){var a,s;t.exports=(a={ifDefined:()=>r.ifDefined},s={},o.d(s,a),s)},1156(t,e,o){var r,s;t.exports=(r={styleMap:()=>a.styleMap},s={},o.d(s,r),s)}},p={};function m(t){var e=p[t];if(void 0!==e)return e.exports;var o=p[t]={exports:{}};return c[t](o,o.exports,m),o.exports}m.m=c,s=[],m.O=(t,e,o,r)=>{if(!e){var a=1/0;for(n=0;n<s.length;n++){for(var[e,o,r]=s[n],i=!0,c=0;c<e.length;c++)(!1&r||a>=r)&&Object.keys(m.O).every(t=>m.O[t](e[c]))?e.splice(c--,1):(i=!1,r<a&&(a=r));if(i){s.splice(n--,1);var p=o();void 0!==p&&(t=p)}}return t}r=r||0;for(var n=s.length;n>0&&s[n-1][2]>r;n--)s[n]=s[n-1];s[n]=[e,o,r]},m.d=(t,e)=>{for(var o in e)m.o(e,o)&&!m.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},m.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{m as __webpack_require__};i={502:0,1745:0,2779:0,4545:0,4928:0,5369:0,6060:0,8111:0,8442:0},m.C=t=>{var e,o,{__webpack_esm_ids__:r,__webpack_esm_modules__:a,__webpack_esm_runtime__:s}=t,c=0;for(e in a)m.o(a,e)&&(m.m[e]=a[e]);for(s&&s(m);c<r.length;c++)o=r[c],m.o(i,o)&&i[o]&&i[o][0](),i[r[c]]=0;m.O()},m.O.j=t=>0===i[t];import*as n from"../9609.js";m.C(n);import*as l from"../4084.js";m.C(l);import*as h from"../3305.js";m.C(h);import*as d from"../4739.js";m.C(d);import*as f from"../7154.js";m.C(f);import*as v from"../9773.js";m.C(v);import*as u from"../5983.js";m.C(u);import*as y from"../2364.js";m.C(y);import*as C from"../519.js";m.C(C);import*as _ from"../4781.js";m.C(_);import*as k from"../5201.js";m.C(k);import*as b from"../5584.js";m.C(b);import*as g from"../8227.js";m.C(g);import*as j from"../4700.js";m.C(j);import*as w from"../9669.js";m.C(w);import*as x from"../887.js";m.C(x);import*as E from"../561.js";m.C(E);var O=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,2364,519,4781,5201,5584,8227,4700,9669,887,561],()=>m(1869));const $=(O=m.O(O)).i,M=O.p;export{$ as Coachmark,M as coachmarkPlacement};