UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 1.4 kB
import{__esDecorate as a,__runInitializers as i}from"tslib";import{computed as c}from"mobx";import{BaseShortcutProvider as n}from"../ShortcutProvider";let l=(()=>{let r=n,o=[],s;return class extends r{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;s=[c],a(this,null,s,{kind:"getter",name:"computedShortcuts",static:!1,private:!1,access:{has:e=>"computedShortcuts"in e,get:e=>e.computedShortcuts},metadata:t},null,o),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=i(this,o);id="speakers";constructor(t){super(),this.rootStore=t}get computedShortcuts(){const{speakerFilterStore:t}=this.rootStore,{filters:e}=t.state;return[]}createShortcuts(){return this.computedShortcuts}handleShortcutClick(t){switch(t){case"companies":this.rootStore.speakerFilterStore.openFilterWithSections(["companies"]);break;case"jobTitles":this.rootStore.speakerFilterStore.openFilterWithSections(["jobTitles"]);break;default:console.warn(`Unknown shortcut ID: ${t}`)}}handleShortcutReset(t){const{speakerFilterStore:e}=this.rootStore;switch(t){case"companies":e.setPending("selectedCompanies",[]),e.applyFilters();break;case"jobTitles":e.setPending("selectedJobTitles",[]),e.applyFilters();break;default:console.warn(`Unknown shortcut ID for reset: ${t}`)}}}})();export{l as SpeakerShortcutProvider};