@zydon/plugin 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,13 @@ interface ViewerProps {
6
6
  appView: ReactNode;
7
7
  checkoutView: ReactNode;
8
8
  productDetailView: ReactNode;
9
+ newOrderView: ReactNode;
10
+ productDetailActionsView: ReactNode;
11
+ productsListView: ReactNode;
12
+ productsListItemView: ReactNode;
13
+ screenView: ReactNode;
9
14
  }
10
15
 
11
- declare const Viewer: ({ appView, configView, checkoutView, productDetailView, }: ViewerProps) => react_jsx_runtime.JSX.Element;
16
+ declare const Viewer: ({ appView, configView, checkoutView, productDetailView, newOrderView, productDetailActionsView, productsListView, productsListItemView, screenView, }: ViewerProps) => react_jsx_runtime.JSX.Element;
12
17
 
13
18
  export { Viewer as default };
@@ -1,22 +1,22 @@
1
1
  import { createContext, useState, useCallback, useMemo, useContext } from 'react';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import Ao from '@zydon/common/components/Common';
4
- import Q1 from '@zydon/common/components/CustomAvatar';
5
- import X1 from '@zydon/common/hooks/useLocalStorage';
6
- import j1 from '@zydon/common/layouts/Admin';
7
- import s from '@mui/material/Stack';
3
+ import kt from '@zydon/common/components/Common';
4
+ import Zo from '@zydon/common/components/CustomAvatar';
5
+ import Ko from '@zydon/common/hooks/useLocalStorage';
6
+ import Go from '@zydon/common/layouts/Admin';
7
+ import C from '@mui/material/Stack';
8
8
  import { styled, alpha } from '@mui/material/styles';
9
- import P from '@mui/material/Button';
10
- import Po from '@mui/material/Drawer';
11
- import Ho from '@mui/material/SvgIcon';
12
- import So from '@mui/material/Tooltip';
13
- import Io from '@mui/material/Typography';
9
+ import s from '@mui/material/Button';
10
+ import ut from '@mui/material/Drawer';
11
+ import Ct from '@mui/material/SvgIcon';
12
+ import st from '@mui/material/Tooltip';
13
+ import ht from '@mui/material/Typography';
14
14
  import { m } from '@zydon/common/components/animate';
15
- import Mo from '@zydon/common/components/IconButton';
16
- import Ro from '@zydon/common/hooks/useToggle';
17
- import _ from '@mui/material/Box';
18
- import ko from '@mui/material/IconButton';
15
+ import wt from '@zydon/common/components/IconButton';
16
+ import xt from '@zydon/common/hooks/useToggle';
17
+ import Y from '@mui/material/Box';
18
+ import mt from '@mui/material/IconButton';
19
19
 
20
- var F="view",A="control",Y="appType",K="layout",G=createContext(null),U=({children:o})=>{let[t,r]=useState(sessionStorage.getItem(A)||"on"),[i,l]=useState(sessionStorage.getItem(F)||"config"),[a,d]=useState(sessionStorage.getItem(Y)||"global"),[c,b]=useState(sessionStorage.getItem(K)||"horizontal"),D1=useCallback(n=>{r(n),sessionStorage.setItem(A,n);},[]),F1=useCallback(()=>{r("off"),sessionStorage.setItem(A,"off");},[]),Y1=useCallback(n=>{l(n),sessionStorage.setItem(F,n);},[]),K1=useCallback(n=>{d(n),sessionStorage.setItem(Y,n);},[]),G1=useCallback(n=>{b(n),sessionStorage.setItem(K,n);},[]);return jsx(G.Provider,{value:{control:t,view:i,appType:a,layout:c,setControl:D1,hideControl:F1,changeView:Y1,changeAppType:K1,changeLayout:G1},children:o})};function h(){let o=useContext(G);if(!o)throw new Error("useViewer must be used within a ViewerProvider");return o}var oo=({children:o})=>{let[t,r]=X1("isNavMini",!1);return jsx(j1,{isNavMini:t,onToggleNavMini:()=>r(!t),headerProps:{slots:{rightAreaEnd:jsx(Q1,{name:"A"})}},sidebarContent:jsx(Fragment,{}),children:o})},q=oo;var J=styled(s)({minHeight:"100vh"}),Q=styled(s)(({theme:o})=>({flexDirection:"row",alignItems:"center",padding:"0 40px",height:64,borderBottom:`1px dashed ${o.palette.grey[200]}`})),X=styled("div")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"center",height:48,width:240,backgroundColor:o.palette.primary.main,borderRadius:4,color:o.palette.primary.contrastText,fontWeight:600})),j=styled(s)({flexDirection:"row",alignItems:"center",padding:"0 40px",height:64,gap:8}),k=styled("div")(({theme:o})=>({height:32,width:120,backgroundColor:o.palette.grey[100],borderRadius:4})),o1=styled(s)(({theme:o})=>({backgroundColor:o.palette.grey[100],flex:1,padding:"24px 40px"}));var eo=({children:o})=>jsxs(J,{children:[jsxs(s,{children:[jsx(Q,{children:jsx(X,{children:"Logo"})}),jsxs(j,{children:[jsx(k,{}),jsx(k,{}),jsx(k,{}),jsx(k,{})]})]}),jsx(o1,{children:o})]}),t1=eo;var r1=styled(s)({minHeight:"100vh",flexDirection:"row"}),e1=styled(s)(({theme:o})=>({gap:16,alignItems:"center",backgroundColor:o.palette.common.white,width:88,padding:16,borderRight:`1px solid ${o.palette.grey[200]}`})),i1=styled(s)(({theme:o})=>({alignItems:"center",justifyContent:"center",width:"100%",height:56,backgroundColor:o.palette.primary.main,color:o.palette.primary.contrastText,fontWeight:600,borderRadius:4,marginBottom:8})),T=styled(s)(({theme:o})=>({width:"80%",height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),n1=styled(s)(({theme:o})=>({justifyContent:"center",alignItems:"center",backgroundColor:o.palette.common.white,height:72})),a1=styled(s)(({theme:o})=>({width:400,height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),l1=styled(s)(({theme:o})=>({backgroundColor:o.palette.grey[100],flex:1}));var io=({children:o})=>jsxs(r1,{children:[jsxs(e1,{children:[jsx(i1,{children:"Logo"}),jsx(T,{}),jsx(T,{}),jsx(T,{})]}),jsxs(l1,{children:[jsx(n1,{children:jsx(a1,{})}),o]})]}),p1=io;var d1=styled(s)({minHeight:"100vh",flexDirection:"row"}),c1=styled(s)(({theme:o})=>({gap:4,alignItems:"center",backgroundColor:o.palette.common.white,width:300,padding:16,borderRight:`1px solid ${o.palette.grey[200]}`})),C1=styled(s)(({theme:o})=>({width:"80%",height:56,alignItems:"center",justifyContent:"center",backgroundColor:o.palette.primary.main,color:o.palette.primary.contrastText,fontWeight:600,borderRadius:4,marginBottom:12,marginRight:"auto"})),M=styled(s)(({theme:o})=>({width:"100%",height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),s1=styled(s)(({theme:o})=>({justifyContent:"center",alignItems:"center",backgroundColor:o.palette.common.white,height:72})),g1=styled(s)(({theme:o})=>({width:400,height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),m1=styled(s)(({theme:o})=>({backgroundColor:o.palette.grey[100],flex:1}));var no=({children:o})=>jsxs(d1,{children:[jsxs(c1,{children:[jsx(C1,{children:"Logo"}),jsx(M,{}),jsx(M,{}),jsx(M,{})]}),jsxs(m1,{children:[jsx(s1,{children:jsx(g1,{})}),o]})]}),u1=no;var ao=({children:o})=>{let{layout:t}=h(),i={horizontal:t1,full:u1,mini:p1}[t];return jsx(i,{children:o})},h1=ao;var po=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxs("g",{opacity:"0.32",children:[jsx("path",{d:"M21 8H13C12.7348 8 12.4804 7.89464 12.2929 7.70711C12.1054 7.51957 12 7.26522 12 7C12 6.73478 12.1054 6.48043 12.2929 6.29289C12.4804 6.10536 12.7348 6 13 6H21C21.2652 6 21.5196 6.10536 21.7071 6.29289C21.8946 6.48043 22 6.73478 22 7C22 7.26522 21.8946 7.51957 21.7071 7.70711C21.5196 7.89464 21.2652 8 21 8ZM21 12H13C12.7348 12 12.4804 11.8946 12.2929 11.7071C12.1054 11.5196 12 11.2652 12 11C12 10.7348 12.1054 10.4804 12.2929 10.2929C12.4804 10.1054 12.7348 10 13 10H21C21.2652 10 21.5196 10.1054 21.7071 10.2929C21.8946 10.4804 22 10.7348 22 11C22 11.2652 21.8946 11.5196 21.7071 11.7071C21.5196 11.8946 21.2652 12 21 12Z",fill:"currentColor"}),jsx("path",{d:"M21 16H3C2.73478 16 2.48043 15.8946 2.29289 15.7071C2.10536 15.5196 2 15.2652 2 15C2 14.7348 2.10536 14.4804 2.29289 14.2929C2.48043 14.1054 2.73478 14 3 14H21C21.2652 14 21.5196 14.1054 21.7071 14.2929C21.8946 14.4804 22 14.7348 22 15C22 15.2652 21.8946 15.5196 21.7071 15.7071C21.5196 15.8946 21.2652 16 21 16ZM13 20H3C2.73478 20 2.48043 19.8946 2.29289 19.7071C2.10536 19.5196 2 19.2652 2 19C2 18.7348 2.10536 18.4804 2.29289 18.2929C2.48043 18.1054 2.73478 18 3 18H13C13.2652 18 13.5196 18.1054 13.7071 18.2929C13.8946 18.4804 14 18.7348 14 19C14 19.2652 13.8946 19.5196 13.7071 19.7071C13.5196 19.8946 13.2652 20 13 20Z",fill:"currentColor"})]}),jsx("rect",{x:"2",y:"4",width:"8",height:"8",rx:"2",fill:"currentColor"})]}),y1=po;var co=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{opacity:"0.32",fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 12C1.5 17.799 6.20101 22.5 12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12ZM12.9491 5.80725C12.5501 5.06425 11.4499 5.06425 11.051 5.80725L9.54862 8.60535L6.36352 9.2112C5.54932 9.36605 5.22022 10.319 5.77507 10.9151L8.03362 13.3415L7.61877 16.5888C7.51432 17.4065 8.39427 18.0073 9.15727 17.6394L12 16.2687L14.8428 17.6394C15.6058 18.0073 16.4857 17.4065 16.3813 16.5888L15.9664 13.3415L18.225 10.9151C18.7798 10.319 18.4507 9.36605 17.6365 9.2112L14.4514 8.60535L12.9491 5.80725Z",fill:"currentColor"}),jsx("path",{d:"M11.051 5.80725C11.4499 5.06425 12.5501 5.06425 12.9491 5.80725L14.4514 8.60535L17.6365 9.2112C18.4507 9.36605 18.7798 10.319 18.225 10.9151L15.9664 13.3415L16.3813 16.5888C16.4857 17.4065 15.6058 18.0073 14.8428 17.6394L12 16.2687L9.15727 17.6394C8.39427 18.0073 7.51432 17.4065 7.61877 16.5888L8.03362 13.3415L5.77507 10.9151C5.22022 10.319 5.54932 9.36605 6.36352 9.2112L9.54862 8.60535L11.051 5.80725Z",fill:"currentColor"})]}),x1=co;var so=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{opacity:"0.32",d:"M3.41016 2.00012C2.71981 2.00012 2.16016 2.55977 2.16016 3.25012C2.16016 3.94048 2.71981 4.50012 3.41016 4.50012H4.25251C4.48986 4.50012 4.69436 4.66605 4.74281 4.89837C4.96591 5.96777 5.59766 8.95907 6.10461 11.0001C6.73135 13.5236 7.29935 15.342 7.6574 16.4029C8.09928 16.1467 8.61259 16 9.16016 16C10.446 16 11.5429 16.809 11.9697 17.9457C12.7178 17.9791 13.5912 18.0001 14.6046 18.0001C15.462 18.0001 16.2042 17.9851 16.8452 17.9602C17.2681 16.8159 18.3689 16 19.6602 16C20.2143 16 20.7334 16.1503 21.1789 16.4123C21.5323 15.5226 22.0073 14.0331 22.4102 11.7501C22.6992 10.1123 22.8768 8.88287 22.986 7.99032C23.1201 6.89392 22.2647 6.00012 21.1602 6.00012H7.66016L7.03891 3.51505C6.81631 2.62472 6.01636 2.00012 5.09861 2.00012H3.41016Z",fill:"currentColor"}),jsx("path",{d:"M17.5505 10.594C17.6091 10.0083 17.1491 9.49997 16.5604 9.49997C16.0492 9.49997 15.6212 9.88732 15.5703 10.396L15.2694 13.4059C15.2108 13.9917 15.6708 14.5 16.2595 14.5C16.7707 14.5 17.1987 14.1126 17.2496 13.6039L17.5505 10.594Z",fill:"currentColor"}),jsx("path",{d:"M12.7496 10.396C12.6987 9.88732 12.2707 9.49997 11.7595 9.49997C11.1708 9.49997 10.7108 10.0083 10.7694 10.594L11.0703 13.6039C11.1212 14.1126 11.5492 14.5 12.0604 14.5C12.6491 14.5 13.1091 13.9917 13.0505 13.4059L12.7496 10.396Z",fill:"currentColor"}),jsx("path",{d:"M16.6602 19C16.6602 20.6569 18.0033 22 19.6602 22C21.317 22 22.6602 20.6569 22.6602 19C22.6602 17.3432 21.317 16 19.6602 16C18.0033 16 16.6602 17.3432 16.6602 19Z",fill:"currentColor"}),jsx("path",{d:"M6.16016 19C6.16016 20.6569 7.50331 22 9.16016 22C10.817 22 12.1602 20.6569 12.1602 19C12.1602 17.3432 10.817 16 9.16016 16C7.50331 16 6.16016 17.3432 6.16016 19Z",fill:"currentColor"})]}),L1=so;var mo=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxs("g",{opacity:"0.32",children:[jsx("path",{d:"M21.4286 9.6V5.6C21.4286 5.17565 21.263 4.76869 20.9683 4.46863C20.6736 4.16857 20.2739 4 19.8571 4H18C17.7239 4 17.5 4.22386 17.5 4.5V5.1C17.5 5.37614 17.7239 5.6 18 5.6H19.8571V9.6C19.8588 10.0559 19.9567 10.5061 20.144 10.9201C20.3313 11.3342 20.6038 11.7024 20.943 12C20.6038 12.2976 20.3313 12.6658 20.144 13.0799C19.9567 13.4939 19.8588 13.9441 19.8571 14.4V18.4H18C17.7239 18.4 17.5 18.6239 17.5 18.9V19.5C17.5 19.7761 17.7239 20 18 20H19.8571C20.2739 20 20.6736 19.8314 20.9683 19.5314C21.263 19.2313 21.4286 18.8243 21.4286 18.4V14.4C21.4286 13.9757 21.5941 13.5687 21.8888 13.2686C22.0644 13.0899 22.2772 12.9578 22.5087 12.8802C22.7705 12.7925 23 12.5761 23 12.3V11.7C23 11.4239 22.7705 11.2075 22.5087 11.1198C22.2772 11.0422 22.0644 10.9101 21.8888 10.7314C21.5941 10.4313 21.4286 10.0243 21.4286 9.6Z",fill:"currentColor"}),jsx("path",{d:"M4.14286 9.6V5.6H6C6.27614 5.6 6.5 5.37614 6.5 5.1V4.5C6.5 4.22386 6.27614 4 6 4H4.14286C3.72609 4 3.32639 4.16857 3.03169 4.46863C2.73699 4.76869 2.57143 5.17565 2.57143 5.6V9.6C2.57143 10.0243 2.40587 10.4313 2.11117 10.7314C1.93562 10.9101 1.72281 11.0422 1.49133 11.1198C1.2295 11.2075 1 11.4239 1 11.7V12.3C1 12.5761 1.2295 12.7925 1.49133 12.8802C1.72281 12.9578 1.93562 13.0899 2.11117 13.2686C2.40587 13.5687 2.57143 13.9757 2.57143 14.4V18.4C2.57143 18.8243 2.73699 19.2313 3.03169 19.5314C3.32639 19.8314 3.72609 20 4.14286 20H6C6.27614 20 6.5 19.7761 6.5 19.5V18.9C6.5 18.6239 6.27614 18.4 6 18.4H4.14286V14.4C4.14116 13.9441 4.04333 13.4939 3.856 13.0799C3.66866 12.6658 3.39619 12.2976 3.057 12C3.39619 11.7024 3.66866 11.3342 3.856 10.9201C4.04333 10.5061 4.14116 10.0559 4.14286 9.6Z",fill:"currentColor"})]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 6.5L12.1072 8.85714H13.6072L14.25 6.5H15.75L15.1072 8.85714H16.5V10.4286H14.679L13.8218 13.5714H15.75V15.1429H13.3928L12.75 17.5H11.25L11.8928 15.1429H10.3928L9.75 17.5H8.25L8.89275 15.1429H7.5V13.5714H9.32175L10.179 10.4286H8.25V8.85714H10.6072L11.25 6.5H12.75ZM13.179 10.4286H11.679L10.8217 13.5714H12.3218L13.179 10.4286Z",fill:"currentColor"})]}),S1=mo;var uo=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{opacity:"0.32",d:"M10.2858 3.91C10.2858 3.342 10.8238 2.75 11.6598 2.75C12.4958 2.75 13.0338 3.342 13.0338 3.91C13.0338 4.221 12.9218 4.491 12.7398 4.69C12.6163 4.82138 12.4896 4.94975 12.3598 5.075L12.2798 5.155C12.0956 5.33334 11.9191 5.51951 11.7508 5.713C11.4858 6.025 11.1978 6.436 11.0928 6.943C10.455 7.04826 9.84886 7.29496 9.31882 7.665L2.22382 12.657C1.29682 13.309 1.05782 14.359 1.39582 15.239C1.72782 16.105 2.58982 16.75 3.70182 16.75H6.00982C6.02582 16.113 6.07082 15.63 6.19382 15.25H3.70382C3.20082 15.25 2.90282 14.977 2.79682 14.702C2.69682 14.441 2.74282 14.126 3.08682 13.883L10.1828 8.893C10.6615 8.56204 11.2289 8.38325 11.8108 8.38C12.3985 8.36959 12.9756 8.53765 13.4658 8.862L20.8988 13.872C21.2548 14.113 21.3048 14.432 21.2068 14.695C21.1038 14.973 20.8068 15.25 20.2978 15.25H17.8078C17.9308 15.63 17.9758 16.113 17.9918 16.75H20.2978C21.4228 16.75 22.2878 16.093 22.6138 15.216C22.9438 14.326 22.6868 13.269 21.7368 12.629L14.3038 7.619C13.8161 7.29185 13.267 7.0673 12.6898 6.959C12.7398 6.878 12.8078 6.787 12.8948 6.685C13.0208 6.536 13.1688 6.387 13.3348 6.221L13.4098 6.149C13.5498 6.009 13.7048 5.857 13.8448 5.704C14.2878 5.224 14.5348 4.589 14.5348 3.909C14.5348 2.367 13.1708 1.25 11.6608 1.25C10.1508 1.25 8.78582 2.367 8.78582 3.91C8.78582 4.10891 8.86484 4.29968 9.00549 4.44033C9.14614 4.58098 9.33691 4.66 9.53582 4.66C9.73473 4.66 9.9255 4.58098 10.0661 4.44033C10.2068 4.29968 10.2858 4.10891 10.2858 3.91Z",fill:"currentColor"}),jsx("path",{d:"M6 18C6 16.114 6 15.172 6.586 14.586C7.172 14 8.114 14 10 14H14C15.886 14 16.828 14 17.414 14.586C18 15.172 18 16.114 18 18C18 19.886 18 20.828 17.414 21.414C16.828 22 15.886 22 14 22H10C8.114 22 7.172 22 6.586 21.414C6 20.828 6 19.886 6 18Z",fill:"currentColor"})]}),v1=uo;var V1=styled(s)(({theme:o})=>({padding:"24px 16px 16px",gap:16,width:"100%",flexWrap:"wrap",borderRadius:12,position:"relative",flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:o.palette.background.paper,boxShadow:`0 0 0 1px ${alpha(o.palette.grey[500],.16)}`})),I1=styled("span")(({theme:o})=>({padding:"2px 8px",top:0,marginLeft:20,left:0,borderRadius:8,position:"absolute",color:o.palette.text.primary,backgroundColor:o.palette.common.white,transform:"translateY(-50%)",fontSize:o.typography.caption.fontSize,fontWeight:600,border:`solid 1px ${alpha(o.palette.grey[500],.24)}`}));var yo=({title:o,children:t})=>jsxs(V1,{children:[o&&jsx(I1,{children:o}),t]}),R=yo;var M1=styled(_,{shouldForwardProp:o=>o!=="selected"})(({theme:o,selected:t})=>({flexShrink:0,borderRadius:8,backgroundColor:o.palette.grey[500],width:10,height:10,opacity:.8,...t&&{opacity:1,background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}})),R1=styled(_,{shouldForwardProp:o=>o!=="selected"&&o!=="layout"})(({theme:o,layout:t,selected:r})=>({flexShrink:0,borderRadius:8,backgroundColor:o.palette.grey[500],width:"100%",height:4,opacity:.48,...t==="horizontal"&&{width:16},...r&&{background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}})),B1=styled(_,{shouldForwardProp:o=>o!=="selected"})(({theme:o,selected:t,layout:r})=>({flexShrink:0,borderRadius:8,backgroundColor:o.palette.grey[500],width:"100%",height:4,maxWidth:14,opacity:.24,...r==="horizontal"&&{maxWidth:10},...t&&{background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}})),W1=styled(s,{shouldForwardProp:o=>o!=="layout"})(({theme:o,layout:t})=>({gap:4,flexShrink:0,padding:6,width:32,height:"100%",borderRightWidth:1,borderRightStyle:"solid",borderRightColor:alpha(o.palette.grey[500],.08),...t==="mini"&&{width:22},...t==="horizontal"&&{width:"100%",height:22,borderRight:"none",alignItems:"center",flexDirection:"row",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:alpha(o.palette.grey[500],.08)}})),A1=styled(P,{shouldForwardProp:o=>o!=="layout"})(({theme:o,layout:t,selected:r})=>({width:"100%",height:64,borderRadius:12,borderWidth:1,borderStyle:"solid",padding:0,borderColor:alpha(o.palette.grey[500],.08),...t==="horizontal"&&{flexDirection:"column"},...r&&{boxShadow:`-8px 8px 20px -4px ${alpha(o.palette.grey[500],.12)}`}})),N1=styled(s,{shouldForwardProp:o=>o!=="selected"})(({theme:o,selected:t})=>({width:"100%",height:"100%",opacity:.2,borderRadius:6,backgroundColor:o.palette.grey[500],...t&&{background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}}));var W=({title:o,layout:t,selected:r,onClick:i})=>jsx(So,{title:o,children:jsxs(A1,{variant:r?"soft":void 0,layout:t,selected:r,onClick:i,children:[jsxs(W1,{layout:t,children:[jsx(M1,{selected:r}),jsx(R1,{layout:t,selected:r}),jsx(B1,{selected:r,layout:t})]}),jsx(s,{p:.5,width:1,height:1,flexGrow:1,children:jsx(N1,{selected:r})})]})});var O1=styled(ko)(({theme:o})=>({color:o.palette.grey[600],position:"fixed",bottom:32,right:32}));var Bo=()=>{let[o,t]=Ro(!1),{control:r,view:i,changeView:l,appType:a,changeAppType:d,layout:c,changeLayout:b}=h();return jsxs(Fragment,{children:[r==="on"&&jsx(So,{title:"Configura\xE7\xF5es",children:jsx(O1,{onClick:t,children:jsxs(Ho,{component:m.svg,animate:{rotate:360},transition:{duration:8,ease:"linear",repeat:1/0},children:[jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2.008 2.008 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.615 1.615 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.026 2.026 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361c0 .558-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a1.99 1.99 0 0 0-.399 1.479c.053.394.287.798.757 1.605c.47.807.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2.008 2.008 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a1.99 1.99 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361c0-.558.306-1.064.782-1.36c.324-.203.533-.364.682-.556a1.99 1.99 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605c-.47-.807-.704-1.21-1.022-1.453a2.026 2.026 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.615 1.615 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2.007 2.007 0 0 0-1.09-1.083",clipRule:"evenodd",opacity:"0.5"}),jsx("path",{fill:"currentColor",d:"M15.523 12c0 1.657-1.354 3-3.023 3c-1.67 0-3.023-1.343-3.023-3S10.83 9 12.5 9c1.67 0 3.023 1.343 3.023 3"})]})})}),jsx(Po,{open:o&&r==="on",onClose:t,anchor:"right",PaperProps:{sx:{p:2,width:400}},children:jsxs(s,{gap:4,children:[jsxs(s,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[jsx(Io,{variant:"subtitle1",fontWeight:700,children:"Configura\xE7\xF5es"}),jsx(Mo,{onClick:t,icon:"CLOSE_MARK_BUTTON",label:"Fechar",color:"grey.500"})]}),jsx(R,{title:"Modo",children:jsxs(s,{display:"grid",gridTemplateColumns:"1fr 1fr",gap:1,width:1,children:[jsx(P,{startIcon:jsx(S1,{}),variant:i==="config"?"contained":void 0,size:"large",fullWidth:!0,onClick:()=>l("config"),children:"Admin"}),jsx(P,{startIcon:jsx(x1,{}),variant:i==="app"?"contained":void 0,size:"large",fullWidth:!0,onClick:()=>l("app"),children:"Plugin"})]})}),i==="app"&&jsxs(Fragment,{children:[jsx(R,{title:"Tipo de plugin",children:jsxs(s,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:1,width:1,children:[jsx(P,{startIcon:jsx(y1,{}),variant:a==="global"?"contained":void 0,onClick:()=>d("global"),children:"Global"}),jsx(P,{startIcon:jsx(L1,{}),variant:a==="checkout"?"contained":void 0,onClick:()=>d("checkout"),children:"Checkout"}),jsx(P,{startIcon:jsx(v1,{}),variant:a==="product-detail"?"contained":void 0,onClick:()=>d("product-detail"),children:"Produto"})]})}),jsx(R,{title:"Layout",children:jsxs(s,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:2,width:1,children:[jsx(W,{title:"Layout Mini",layout:"mini",selected:c==="mini",onClick:()=>b("mini")}),jsx(W,{title:"Layout Vertical",layout:"full",selected:c==="full",onClick:()=>b("full")}),jsx(W,{title:"Layout Horizontal",layout:"horizontal",selected:c==="horizontal",onClick:()=>b("horizontal")})]})})]})]})})]})},$1=Bo;var No=({configView:o,appView:t,checkoutView:r,productDetailView:i})=>{let{view:l,appType:a}=h(),d=l==="config"?q:h1,c=useMemo(()=>{if(l==="config")return o;if(a==="global")return t;if(a==="checkout")return r;if(a==="product-detail")return i},[l,o,a,t,r,i]);return jsxs(Fragment,{children:[jsx(d,{children:c}),jsx(Ao,{primaryColor:"#000000",children:jsx($1,{})})]})},E1=No;var zo=({appView:o,configView:t,checkoutView:r,productDetailView:i})=>jsx(U,{children:jsx(E1,{configView:t,appView:o,checkoutView:r,productDetailView:i})}),vt=zo;
20
+ var K="view",O="control",G="appType",U="layout",q=createContext(null),J=({children:o})=>{let[t,e]=useState(sessionStorage.getItem(O)||"on"),[i,m]=useState(sessionStorage.getItem(K)||"config"),[n,a]=useState(sessionStorage.getItem(G)||"global"),[d,c]=useState(sessionStorage.getItem(U)||"horizontal"),P=useCallback(l=>{e(l),sessionStorage.setItem(O,l);},[]),p=useCallback(()=>{e("off"),sessionStorage.setItem(O,"off");},[]),N=useCallback(l=>{m(l),sessionStorage.setItem(K,l);},[]),z=useCallback(l=>{a(l),sessionStorage.setItem(G,l);},[]),_o=useCallback(l=>{c(l),sessionStorage.setItem(U,l);},[]);return jsx(q.Provider,{value:{control:t,view:i,appType:n,layout:d,setControl:P,hideControl:p,changeView:N,changeAppType:z,changeLayout:_o},children:o})};function w(){let o=useContext(q);if(!o)throw new Error("useViewer must be used within a ViewerProvider");return o}var Uo=({children:o})=>{let[t,e]=Ko("isNavMini",!1);return jsx(Go,{isNavMini:t,onToggleNavMini:()=>e(!t),headerProps:{slots:{rightAreaEnd:jsx(Zo,{name:"A"})}},sidebarContent:jsx(Fragment,{}),children:o})},Q=Uo;var X=styled(C)({minHeight:"100vh"}),j=styled(C)(({theme:o})=>({flexDirection:"row",alignItems:"center",padding:"0 40px",height:64,borderBottom:`1px dashed ${o.palette.grey[200]}`})),oo=styled("div")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"center",height:48,width:240,backgroundColor:o.palette.primary.main,borderRadius:4,color:o.palette.primary.contrastText,fontWeight:600})),to=styled(C)({flexDirection:"row",alignItems:"center",padding:"0 40px",height:64,gap:8}),V=styled("div")(({theme:o})=>({height:32,width:120,backgroundColor:o.palette.grey[100],borderRadius:4})),eo=styled(C)(({theme:o})=>({backgroundColor:o.palette.grey[100],flex:1,padding:"24px 40px"}));var Qo=({children:o})=>jsxs(X,{children:[jsxs(C,{children:[jsx(j,{children:jsx(oo,{children:"Logo"})}),jsxs(to,{children:[jsx(V,{}),jsx(V,{}),jsx(V,{}),jsx(V,{})]})]}),jsx(eo,{children:o})]}),ro=Qo;var io=styled(C)({minHeight:"100vh",flexDirection:"row"}),no=styled(C)(({theme:o})=>({gap:16,alignItems:"center",backgroundColor:o.palette.common.white,width:88,padding:16,borderRight:`1px solid ${o.palette.grey[200]}`})),ao=styled(C)(({theme:o})=>({alignItems:"center",justifyContent:"center",width:"100%",height:56,backgroundColor:o.palette.primary.main,color:o.palette.primary.contrastText,fontWeight:600,borderRadius:4,marginBottom:8})),R=styled(C)(({theme:o})=>({width:"80%",height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),po=styled(C)(({theme:o})=>({justifyContent:"center",alignItems:"center",backgroundColor:o.palette.common.white,height:72})),lo=styled(C)(({theme:o})=>({width:400,height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),co=styled(C)(({theme:o})=>({backgroundColor:o.palette.grey[100],flex:1}));var Xo=({children:o})=>jsxs(io,{children:[jsxs(no,{children:[jsx(ao,{children:"Logo"}),jsx(R,{}),jsx(R,{}),jsx(R,{})]}),jsxs(co,{children:[jsx(po,{children:jsx(lo,{})}),o]})]}),so=Xo;var mo=styled(C)({minHeight:"100vh",flexDirection:"row"}),go=styled(C)(({theme:o})=>({gap:4,alignItems:"center",backgroundColor:o.palette.common.white,width:300,padding:16,borderRight:`1px solid ${o.palette.grey[200]}`})),uo=styled(C)(({theme:o})=>({width:"80%",height:56,alignItems:"center",justifyContent:"center",backgroundColor:o.palette.primary.main,color:o.palette.primary.contrastText,fontWeight:600,borderRadius:4,marginBottom:12,marginRight:"auto"})),B=styled(C)(({theme:o})=>({width:"100%",height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),Co=styled(C)(({theme:o})=>({justifyContent:"center",alignItems:"center",backgroundColor:o.palette.common.white,height:72})),fo=styled(C)(({theme:o})=>({width:400,height:40,backgroundColor:o.palette.grey[200],borderRadius:4})),ho=styled(C)(({theme:o})=>({backgroundColor:o.palette.grey[100],flex:1}));var jo=({children:o})=>jsxs(mo,{children:[jsxs(go,{children:[jsx(uo,{children:"Logo"}),jsx(B,{}),jsx(B,{}),jsx(B,{})]}),jsxs(ho,{children:[jsx(Co,{children:jsx(fo,{})}),o]})]}),yo=jo;var ot=({children:o})=>{let{layout:t}=w(),i={horizontal:ro,full:yo,mini:so}[t];return jsx(i,{children:o})},wo=ot;var et=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{opacity:"0.32",fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 12C1.5 17.799 6.20101 22.5 12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12ZM12.9491 5.80725C12.5501 5.06425 11.4499 5.06425 11.051 5.80725L9.54862 8.60535L6.36352 9.2112C5.54932 9.36605 5.22022 10.319 5.77507 10.9151L8.03362 13.3415L7.61877 16.5888C7.51432 17.4065 8.39427 18.0073 9.15727 17.6394L12 16.2687L14.8428 17.6394C15.6058 18.0073 16.4857 17.4065 16.3813 16.5888L15.9664 13.3415L18.225 10.9151C18.7798 10.319 18.4507 9.36605 17.6365 9.2112L14.4514 8.60535L12.9491 5.80725Z",fill:"currentColor"}),jsx("path",{d:"M11.051 5.80725C11.4499 5.06425 12.5501 5.06425 12.9491 5.80725L14.4514 8.60535L17.6365 9.2112C18.4507 9.36605 18.7798 10.319 18.225 10.9151L15.9664 13.3415L16.3813 16.5888C16.4857 17.4065 15.6058 18.0073 14.8428 17.6394L12 16.2687L9.15727 17.6394C8.39427 18.0073 7.51432 17.4065 7.61877 16.5888L8.03362 13.3415L5.77507 10.9151C5.22022 10.319 5.54932 9.36605 6.36352 9.2112L9.54862 8.60535L11.051 5.80725Z",fill:"currentColor"})]}),bo=et;var it=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxs("g",{opacity:"0.32",children:[jsx("path",{d:"M21.4286 9.6V5.6C21.4286 5.17565 21.263 4.76869 20.9683 4.46863C20.6736 4.16857 20.2739 4 19.8571 4H18C17.7239 4 17.5 4.22386 17.5 4.5V5.1C17.5 5.37614 17.7239 5.6 18 5.6H19.8571V9.6C19.8588 10.0559 19.9567 10.5061 20.144 10.9201C20.3313 11.3342 20.6038 11.7024 20.943 12C20.6038 12.2976 20.3313 12.6658 20.144 13.0799C19.9567 13.4939 19.8588 13.9441 19.8571 14.4V18.4H18C17.7239 18.4 17.5 18.6239 17.5 18.9V19.5C17.5 19.7761 17.7239 20 18 20H19.8571C20.2739 20 20.6736 19.8314 20.9683 19.5314C21.263 19.2313 21.4286 18.8243 21.4286 18.4V14.4C21.4286 13.9757 21.5941 13.5687 21.8888 13.2686C22.0644 13.0899 22.2772 12.9578 22.5087 12.8802C22.7705 12.7925 23 12.5761 23 12.3V11.7C23 11.4239 22.7705 11.2075 22.5087 11.1198C22.2772 11.0422 22.0644 10.9101 21.8888 10.7314C21.5941 10.4313 21.4286 10.0243 21.4286 9.6Z",fill:"currentColor"}),jsx("path",{d:"M4.14286 9.6V5.6H6C6.27614 5.6 6.5 5.37614 6.5 5.1V4.5C6.5 4.22386 6.27614 4 6 4H4.14286C3.72609 4 3.32639 4.16857 3.03169 4.46863C2.73699 4.76869 2.57143 5.17565 2.57143 5.6V9.6C2.57143 10.0243 2.40587 10.4313 2.11117 10.7314C1.93562 10.9101 1.72281 11.0422 1.49133 11.1198C1.2295 11.2075 1 11.4239 1 11.7V12.3C1 12.5761 1.2295 12.7925 1.49133 12.8802C1.72281 12.9578 1.93562 13.0899 2.11117 13.2686C2.40587 13.5687 2.57143 13.9757 2.57143 14.4V18.4C2.57143 18.8243 2.73699 19.2313 3.03169 19.5314C3.32639 19.8314 3.72609 20 4.14286 20H6C6.27614 20 6.5 19.7761 6.5 19.5V18.9C6.5 18.6239 6.27614 18.4 6 18.4H4.14286V14.4C4.14116 13.9441 4.04333 13.4939 3.856 13.0799C3.66866 12.6658 3.39619 12.2976 3.057 12C3.39619 11.7024 3.66866 11.3342 3.856 10.9201C4.04333 10.5061 4.14116 10.0559 4.14286 9.6Z",fill:"currentColor"})]}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 6.5L12.1072 8.85714H13.6072L14.25 6.5H15.75L15.1072 8.85714H16.5V10.4286H14.679L13.8218 13.5714H15.75V15.1429H13.3928L12.75 17.5H11.25L11.8928 15.1429H10.3928L9.75 17.5H8.25L8.89275 15.1429H7.5V13.5714H9.32175L10.179 10.4286H8.25V8.85714H10.6072L11.25 6.5H12.75ZM13.179 10.4286H11.679L10.8217 13.5714H12.3218L13.179 10.4286Z",fill:"currentColor"})]}),ko=it;var vo=styled(C)(({theme:o})=>({padding:"24px 16px 16px",gap:16,width:"100%",flexWrap:"wrap",borderRadius:12,position:"relative",flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:o.palette.background.paper,boxShadow:`0 0 0 1px ${alpha(o.palette.grey[500],.16)}`})),Vo=styled("span")(({theme:o})=>({padding:"2px 8px",top:0,marginLeft:20,left:0,borderRadius:8,position:"absolute",color:o.palette.text.primary,backgroundColor:o.palette.common.white,transform:"translateY(-50%)",fontSize:o.typography.caption.fontSize,fontWeight:600,border:`solid 1px ${alpha(o.palette.grey[500],.24)}`}));var at=({title:o,children:t})=>jsxs(vo,{children:[o&&jsx(Vo,{children:o}),t]}),M=at;var Io=styled(Y,{shouldForwardProp:o=>o!=="selected"})(({theme:o,selected:t})=>({flexShrink:0,borderRadius:8,backgroundColor:o.palette.grey[500],width:10,height:10,opacity:.8,...t&&{opacity:1,background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}})),Ho=styled(Y,{shouldForwardProp:o=>o!=="selected"&&o!=="layout"})(({theme:o,layout:t,selected:e})=>({flexShrink:0,borderRadius:8,backgroundColor:o.palette.grey[500],width:"100%",height:4,opacity:.48,...t==="horizontal"&&{width:16},...e&&{background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}})),Ro=styled(Y,{shouldForwardProp:o=>o!=="selected"})(({theme:o,selected:t,layout:e})=>({flexShrink:0,borderRadius:8,backgroundColor:o.palette.grey[500],width:"100%",height:4,maxWidth:14,opacity:.24,...e==="horizontal"&&{maxWidth:10},...t&&{background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}})),Bo=styled(C,{shouldForwardProp:o=>o!=="layout"})(({theme:o,layout:t})=>({gap:4,flexShrink:0,padding:6,width:32,height:"100%",borderRightWidth:1,borderRightStyle:"solid",borderRightColor:alpha(o.palette.grey[500],.08),...t==="mini"&&{width:22},...t==="horizontal"&&{width:"100%",height:22,borderRight:"none",alignItems:"center",flexDirection:"row",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:alpha(o.palette.grey[500],.08)}})),Mo=styled(s,{shouldForwardProp:o=>o!=="layout"})(({theme:o,layout:t,selected:e})=>({width:"100%",height:64,borderRadius:12,borderWidth:1,borderStyle:"solid",padding:0,borderColor:alpha(o.palette.grey[500],.08),...t==="horizontal"&&{flexDirection:"column"},...e&&{boxShadow:`-8px 8px 20px -4px ${alpha(o.palette.grey[500],.12)}`}})),Wo=styled(C,{shouldForwardProp:o=>o!=="selected"})(({theme:o,selected:t})=>({width:"100%",height:"100%",opacity:.2,borderRadius:6,backgroundColor:o.palette.grey[500],...t&&{background:`linear-gradient(135deg, ${o.palette.primary.light} 0%, ${o.palette.primary.main} 100%)`}}));var A=({title:o,layout:t,selected:e,onClick:i})=>jsx(st,{title:o,children:jsxs(Mo,{variant:e?"soft":void 0,layout:t,selected:e,onClick:i,children:[jsxs(Bo,{layout:t,children:[jsx(Io,{selected:e}),jsx(Ho,{layout:t,selected:e}),jsx(Ro,{selected:e,layout:t})]}),jsx(C,{p:.5,width:1,height:1,flexGrow:1,children:jsx(Wo,{selected:e})})]})});var No=styled(mt)(({theme:o})=>({color:o.palette.grey[600],position:"fixed",bottom:32,right:32}));var bt=()=>{let[o,t]=xt(!1),{control:e,view:i,changeView:m$1,appType:n,changeAppType:a,layout:d,changeLayout:c}=w();return jsxs(Fragment,{children:[e==="on"&&jsx(st,{title:"Configura\xE7\xF5es",children:jsx(No,{onClick:t,children:jsxs(Ct,{component:m.svg,animate:{rotate:360},transition:{duration:8,ease:"linear",repeat:1/0},children:[jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.279 2.152C13.909 2 13.439 2 12.5 2s-1.408 0-1.779.152a2.008 2.008 0 0 0-1.09 1.083c-.094.223-.13.484-.145.863a1.615 1.615 0 0 1-.796 1.353a1.64 1.64 0 0 1-1.579.008c-.338-.178-.583-.276-.825-.308a2.026 2.026 0 0 0-1.49.396c-.318.242-.553.646-1.022 1.453c-.47.807-.704 1.21-.757 1.605c-.07.526.074 1.058.4 1.479c.148.192.357.353.68.555c.477.297.783.803.783 1.361c0 .558-.306 1.064-.782 1.36c-.324.203-.533.364-.682.556a1.99 1.99 0 0 0-.399 1.479c.053.394.287.798.757 1.605c.47.807.704 1.21 1.022 1.453c.424.323.96.465 1.49.396c.242-.032.487-.13.825-.308a1.64 1.64 0 0 1 1.58.008c.486.28.774.795.795 1.353c.015.38.051.64.145.863c.204.49.596.88 1.09 1.083c.37.152.84.152 1.779.152s1.409 0 1.779-.152a2.008 2.008 0 0 0 1.09-1.083c.094-.223.13-.483.145-.863c.02-.558.309-1.074.796-1.353a1.64 1.64 0 0 1 1.579-.008c.338.178.583.276.825.308c.53.07 1.066-.073 1.49-.396c.318-.242.553-.646 1.022-1.453c.47-.807.704-1.21.757-1.605a1.99 1.99 0 0 0-.4-1.479c-.148-.192-.357-.353-.68-.555c-.477-.297-.783-.803-.783-1.361c0-.558.306-1.064.782-1.36c.324-.203.533-.364.682-.556a1.99 1.99 0 0 0 .399-1.479c-.053-.394-.287-.798-.757-1.605c-.47-.807-.704-1.21-1.022-1.453a2.026 2.026 0 0 0-1.49-.396c-.242.032-.487.13-.825.308a1.64 1.64 0 0 1-1.58-.008a1.615 1.615 0 0 1-.795-1.353c-.015-.38-.051-.64-.145-.863a2.007 2.007 0 0 0-1.09-1.083",clipRule:"evenodd",opacity:"0.5"}),jsx("path",{fill:"currentColor",d:"M15.523 12c0 1.657-1.354 3-3.023 3c-1.67 0-3.023-1.343-3.023-3S10.83 9 12.5 9c1.67 0 3.023 1.343 3.023 3"})]})})}),jsx(ut,{open:o&&e==="on",onClose:t,anchor:"right",PaperProps:{sx:{p:2,width:400}},children:jsxs(C,{gap:4,children:[jsxs(C,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[jsx(ht,{variant:"subtitle1",fontWeight:700,children:"Configura\xE7\xF5es"}),jsx(wt,{onClick:t,icon:"CLOSE_MARK_BUTTON",label:"Fechar",color:"grey.500"})]}),jsx(M,{title:"Modo",children:jsxs(C,{display:"grid",gridTemplateColumns:"1fr 1fr",gap:1,width:1,children:[jsx(s,{startIcon:jsx(ko,{}),variant:i==="config"?"contained":void 0,size:"large",fullWidth:!0,onClick:()=>m$1("config"),children:"Admin"}),jsx(s,{startIcon:jsx(bo,{}),variant:i==="app"?"contained":void 0,size:"large",fullWidth:!0,onClick:()=>m$1("app"),children:"Plugin"})]})}),i==="app"&&jsxs(Fragment,{children:[jsx(M,{title:"Tipo de plugin",children:jsxs(C,{display:"grid",gridTemplateColumns:"1fr",gap:1,width:1,children:[jsx(s,{variant:n==="global"?"contained":void 0,onClick:()=>a("global"),children:"Global"}),jsx(s,{variant:n==="new-order"?"contained":void 0,onClick:()=>a("new-order"),children:"Novo pedido"}),jsx(s,{variant:n==="products-list"?"contained":void 0,onClick:()=>a("products-list"),children:"Lista de produtos"}),jsx(s,{variant:n==="products-list-item"?"contained":void 0,onClick:()=>a("products-list-item"),children:"Item da lista de produtos"}),jsx(s,{variant:n==="product-detail"?"contained":void 0,onClick:()=>a("product-detail"),children:"Detalhes do produto"}),jsx(s,{variant:n==="product-detail-actions"?"contained":void 0,onClick:()=>a("product-detail-actions"),children:"A\xE7\xF5es do produto"}),jsx(s,{variant:n==="checkout"?"contained":void 0,onClick:()=>a("checkout"),children:"Checkout"}),jsx(s,{variant:n==="screen"?"contained":void 0,onClick:()=>a("screen"),children:"Tela"})]})}),jsx(M,{title:"Layout",children:jsxs(C,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:2,width:1,children:[jsx(A,{title:"Layout Mini",layout:"mini",selected:d==="mini",onClick:()=>c("mini")}),jsx(A,{title:"Layout Vertical",layout:"full",selected:d==="full",onClick:()=>c("full")}),jsx(A,{title:"Layout Horizontal",layout:"horizontal",selected:d==="horizontal",onClick:()=>c("horizontal")})]})})]})]})})]})},Oo=bt;var St=({configView:o,appView:t,checkoutView:e,productDetailView:i,newOrderView:m,productDetailActionsView:n,productsListView:a,productsListItemView:d,screenView:c})=>{let{view:P,appType:p}=w(),N=P==="config"?Q:wo,z=useMemo(()=>{if(P==="config")return o;if(p==="global")return t;if(p==="checkout")return e;if(p==="product-detail")return i;if(p==="new-order")return m;if(p==="product-detail-actions")return n;if(p==="products-list")return a;if(p==="products-list-item")return d;if(p==="screen")return c},[P,o,p,t,e,i,m,n,a,d,c]);return jsxs(Fragment,{children:[jsx(N,{children:z}),jsx(kt,{primaryColor:"#000000",children:jsx(Oo,{})})]})},$o=St;var Vt=({appView:o,configView:t,checkoutView:e,productDetailView:i,newOrderView:m,productDetailActionsView:n,productsListView:a,productsListItemView:d,screenView:c})=>jsx(J,{children:jsx($o,{configView:t,appView:o,checkoutView:e,productDetailView:i,newOrderView:m,productDetailActionsView:n,productsListView:a,productsListItemView:d,screenView:c})}),ir=Vt;
21
21
 
22
- export { vt as default };
22
+ export { ir as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/plugin",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",