UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 1.05 kB
import{jsx as t,jsxs as s}from"react/jsx-runtime";import{observer as h}from"mobx-react-lite";import m from"../../store";import{t as f}from"../../utils/i18n";import u from"../Autocomplete";const v=()=>s("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("rect",{width:"22",height:"22",rx:"11",fill:"#2382F4"}),t("path",{d:"M16 11C16 13.7614 13.7614 16 11 16C8.23858 16 6 13.7614 6 11C6 8.23858 8.23858 6 11 6C13.7614 6 16 8.23858 16 11Z",fill:"white"})]}),g=h(({startPoint:o,onSelectStartPoint:r})=>{const n=m.routePlannerStore,l=n.startPointBoothOptions,i=n.startPointAutocompleteOptions,a=e=>{const c=l.find(d=>d.id.toString()===e?.value)||null;r(c)},p=o?i.find(e=>e.value===o.id.toString()):void 0;return s("div",{className:"efp-planner__stop is-start",children:[t("div",{className:"efp-planner__stop-timeline",children:t(v,{})}),t("div",{className:"efp-planner__stop-content",children:t(u,{placeholder:f("Select starting point"),options:i,value:p,onChange:a})})]})});export default g;