UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 2.05 kB
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{observer as N}from"mobx-react-lite";import b from"../../data";import{uiState as d}from"../../store";import{t as a}from"../../utils/i18n";import m from"../../utils/is-iframe";import{Button as _,LevelBadge as y}from"../";export const BoothWithoutExhibitor=N(({booth:i,description:l,showBuy:h,showReserve:f,isRebooking:o,level:v})=>{const c=t=>{if(t){const s=new URL(t);return!s.searchParams.has("type")&&i.type&&s.searchParams.append("type",i.type),!s.searchParams.has("price")&&i.price&&!d.previewMode&&s.searchParams.append("price",i.price),s}else return null},n=c(i.buyUrl),p=c(i.reserveUrl);return r("div",{className:"booth__content -reg",children:[e(y,{level:v}),r("div",{className:"booth__infos",children:[i.type&&r("div",{className:"booth__info",children:[e("div",{className:"booth__info-icon",children:e("i",{className:"icon-box-3d"})}),r("div",{className:"booth__info-body",children:[e("div",{className:"booth__info-title",children:a("{{boothTerm}} Type",{boothTerm:b.boothTerm})}),e("div",{className:"booth__info-val",children:i.type})]})]}),i.size&&r("div",{className:"booth__info",children:[e("div",{className:"booth__info-icon",children:e("i",{className:"icon-size"})}),r("div",{className:"booth__info-body",children:[e("div",{className:"booth__info-title",children:a("Size")}),e("div",{className:"booth__info-val",children:i.size})]})]}),!o&&i.price&&i.price!=="0"&&!d.previewMode&&r("div",{className:"booth__info",children:[e("div",{className:"booth__info-icon",children:e("i",{className:"icon-tag"})}),r("div",{className:"booth__info-body",children:[e("div",{className:"booth__info-title",children:a("Price")}),e("div",{className:"booth__info-val",children:i.price})]})]})]}),!o&&l&&e("span",{dangerouslySetInnerHTML:{__html:l},className:"booth__reserve-instructions"}),r("div",{className:"booth__buy",children:[!o&&h&&e(_,{link:n?.href,target:m?"_blank":"_self",children:a("Buy")}),!o&&f&&e(_,{link:p?.href||n?.href,target:m?"_blank":"_self",children:a("Reserve")})]})]})});