@sikka/hawa 0.0.33 → 0.0.36
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.
- package/README.md +11 -1
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +12 -9
- package/rollup.config.js +2 -2
- package/src/blocks/Pricing/index.js +1 -0
- package/src/blocks/index.js +4 -0
- package/src/elements/AdaptiveButton.js +1 -1
- package/src/elements/DragDropImages.js +135 -143
- package/src/elements/DraggableCard.js +36 -0
- package/src/elements/HawaPopMenu.js +1 -1
- package/src/elements/HawaSelectInput.js +30 -0
- package/src/elements/HawaSnackbar.js +32 -3
- package/src/elements/index.js +2 -0
- package/src/index.js +1 -3
- package/src/layout/HawaAppLayout.js +197 -173
- package/src/layout/HawaAppLayout2.js +260 -0
- package/src/layout/HawaPageControls.js +61 -0
- package/src/layout/index.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.3f5171ae.iframe.bundle.js +1 -0
- package/storybook-static/{vendors~main.a697e07137d366f95f76.manager.bundle.js → vendors~main.11281b487bf96f5ff19e.manager.bundle.js} +2 -2
- package/storybook-static/{vendors~main.a697e07137d366f95f76.manager.bundle.js.LICENSE.txt → vendors~main.11281b487bf96f5ff19e.manager.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.3cf4a535.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.a7262b49.iframe.bundle.js.LICENSE.txt → vendors~main.3cf4a535.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.3cf4a535.iframe.bundle.js.map +1 -0
- package/storybook-static/main.2511f65a.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.a7262b49.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.a7262b49.iframe.bundle.js.map +0 -1
package/README.md
CHANGED
|
@@ -17,7 +17,6 @@ npm install --save @sikka/hawa
|
|
|
17
17
|
|
|
18
18
|
# Roadmap
|
|
19
19
|
|
|
20
|
-
- [ ] Change borders and margin, padding in one place
|
|
21
20
|
- [ ] Drag and drop tool to create a layout of boxes
|
|
22
21
|
|
|
23
22
|
</br>
|
|
@@ -48,3 +47,14 @@ npm run storybook
|
|
|
48
47
|
## License
|
|
49
48
|
|
|
50
49
|
MIT © [SIKKA SOFTWARE](https://sikka.sa)
|
|
50
|
+
|
|
51
|
+
<!--start: logo-->
|
|
52
|
+
<p align="center">
|
|
53
|
+
<a href="https://sikka.io">
|
|
54
|
+
<img width="44" alt="Sikka" src="https://xakher-images.s3.ap-southeast-1.amazonaws.com/sikka/sikka-symbol-black.svg">
|
|
55
|
+
</a>
|
|
56
|
+
</p>
|
|
57
|
+
<p align="center">
|
|
58
|
+
<sub>An open source project by <a href="https://sikka.io">Sikka</a></sub>
|
|
59
|
+
</p>
|
|
60
|
+
<!--end: logo-->
|
package/es/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import t,{useState as r}from"react";import n from"@mui/material/Button";import i from"@mui/material/Tooltip";import a from"prop-types";import{jsxs as l,jsx as o,Fragment as s}from"react/jsx-runtime";import d from"@mui/material/Snackbar";import u from"@mui/material/AlertTitle";import c from"@mui/material/Alert";import m from"@mui/material/FormControlLabel";import p from"@mui/material/Checkbox";import h from"@mui/material/Container";import g from"@mui/material/Typography";import f from"@mui/icons-material/CheckCircleOutlined";import v from"@mui/material/Chip";import x from"@mui/material/Input";import b from"@mui/material/InputLabel";import y from"@mui/material/Switch";import w from"@emotion/styled";import T from"@mui/material/Slider";import C from"@mui/material/Stack";import P from"@mui/icons-material/GitHub";import k from"@mui/icons-material/Twitter";import L from"@mui/icons-material/AccountBalanceWallet";import S from"@mui/material/Select";import W from"@mui/material/Table";import O from"@mui/material/TableBody";import N from"@mui/material/TableCell";import I from"@mui/material/TableContainer";import A from"@mui/material/TableHead";import q from"@mui/material/TableRow";import{Button as R,InputAdornment as j,useTheme as E}from"@mui/material";import{Search as z}from"@mui/icons-material";import B from"@mui/icons-material/ExpandMore";import D from"@mui/material/Accordion";import M from"@mui/material/AccordionSummary";import G from"@mui/material/AccordionDetails";import{useForm as U,FormProvider as $,Controller as _}from"react-hook-form";import V from"@mui/material/InputAdornment";import F from"@mui/icons-material/HttpsOutlined";import Z from"@mui/icons-material/MailOutline";import H from"@mui/icons-material/PermIdentityOutlined";import X from"@mui/material/Divider";import{styled as Y,useTheme as J}from"@mui/material/styles";import K from"@mui/material/Box";import Q from"@mui/material/Drawer";import ee from"@mui/material/AppBar";import te from"@mui/material/Toolbar";import re from"@mui/material/List";import ne from"@mui/material/IconButton";import ie from"@mui/icons-material/Menu";import ae from"@mui/icons-material/ChevronLeft";import le from"@mui/icons-material/ChevronRight";import oe from"@mui/material/ListItemButton";import se from"@mui/material/ListItemText";import de from"@mui/material/Avatar";import ue from"@mui/material/Menu";import ce from"@mui/material/MenuItem";import me from"@mui/icons-material/Close";import pe from"@mui/material/Dialog";import he from"@mui/material/DialogActions";import ge from"@mui/material/DialogContent";import fe from"@mui/material/DialogTitle";function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){be(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function be(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function we(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){o=!0,i=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ce(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ce(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Pe=function(e){return e.showText?l(n,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,o("div",{style:{width:10}}),e.buttonText]}):o(i,{title:e.buttonText,placement:"top",children:o(n,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};Pe.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var ke=function(e){return o(n,xe(xe({},e),{},{children:e.text}))},Le=function(e){return o(d,{open:e.open,onClose:e.handleClose,children:l(c,{icon:!1,severity:e.severity,children:[e.title&&o(u,{children:e.title}),e.text]})})},Se=function(e){return console.log("props : ",e),o(t.Fragment,{children:o(m,{label:e.label,control:o(p,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},We=function(e){var t=Te(r(e.defaultValue),2),i=t[0],a=t[1];return o(h,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var l;return o(n,{onClick:function(){e.handleChange(t.value),a(t.value)},fullWidth:!0,variant:(null==i?void 0:i.toLowerCase())===(null===(l=t.value)||void 0===l?void 0:l.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};We.propTypes={lang:a.string,options:a.arrayOf(a.shape({label:a.string,value:a.string})),defaultValue:a.string,handleChange:a.func,location:a.string};var Oe=function(e){var t="ar"===e.lang;return l(h,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l(h,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&o("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&o(h,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&o(h,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Oe.propTypes={lang:a.string,onCardClick:a.func};var Ne=function(e){var t,r,i="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},s={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={usd:i?"دولار":"$",sar:i?"ريال":"SAR"},u=i?e.features_ar:e.features,c=i?{left:10}:{right:10};return l(h,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:i?"rtl":"ltr"},children:[l(h,{variant:"plan-header",children:[e.discount&&o(v,{label:e.discount,variant:"standard",style:xe({maxWidth:"fit-content",position:"absolute",bottom:10},c),color:"success"}),o(g,{variant:"h3",fontWeight:500,children:i?e.title_ar:e.title}),o(g,{variant:"caption",children:i?e.subtitle_ar:e.subtitle}),o("br",{}),o(g,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,o("div",{style:{width:5}}),o(g,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),o(g,{style:{fontSize:14,margin:5},children:i?a[e.cycleText]:s[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[o(g,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),o("div",{style:{width:5}}),e.price]}),o(g,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:s[e.cycleText]})]})})]}),o("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==u?void 0:u.map((function(e){return l("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:o(f,{fontSize:"small"})}),o("div",{style:{width:10}}),o(g,{variant:"subtitle2",children:e})]})}))}),o(n,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ne.propTypes={lang:a.string,buttonText:a.string,selectedPlan:a.string,title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,features:a.array,features_ar:a.array,currency:a.oneOf(["sar","usd"]),cycleText:a.oneOf(["monthly","3-months","6-months","annually"])};var Ie=function(e){return o(g,xe(xe({},e),{},{children:e.children}))},Ae=function(e){return o("div",{style:e.inForm&&{width:"100%"},children:l("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&o(b,{children:e.label}),e.helperText&&o(g,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),o(x,xe({disableUnderline:!0},e))]})})},qe=function(e){return o(y,xe({},e))};var Re="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},je.apply(this,arguments)}function Ee(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function ze(e,t,r={clone:!0}){const n=r.clone?je({},e):e;return Ee(e)&&Ee(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Ee(t[i])&&i in e&&Ee(e[i])?n[i]=ze(e[i],t[i],r):n[i]=t[i])})),n}const Be=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],De=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Me=[...Be,...De];function Ge(e){return function(e,t,r,n){const i=(a=e,((l=t)&&"string"==typeof l?l.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,l;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Ue(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Be.reduce(((e,t)=>(e[t]=Re,e)),{}),"production"===process.env.NODE_ENV||De.reduce(((e,t)=>(e[t]=Re,e)),{}),"production"===process.env.NODE_ENV||Me.reduce(((e,t)=>(e[t]=Re,e)),{});const $e=["values","unit","step"];function _e(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=Ue(e,$e),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>je({},e,{[t.key]:t.val})),{})})(t),l=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,i){const a=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[l[a]]?t[l[a]]:i)-n/100}${r})`}return je({keys:l,values:a,up:o,down:s,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(e,l[l.indexOf(e)+1]):o(e)},not:function(e){const t=l.indexOf(e);return 0===t?o(l[1]):t===l.length-1?s(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Ve={borderRadius:4};const Fe=["breakpoints","palette","spacing","shape"];const Ze=e.createContext(null);"production"!==process.env.NODE_ENV&&(Ze.displayName="ThemeContext");var He=Ze;function Xe(t=null){const r=function(){const t=e.useContext(He);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const Ye=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=Ue(e,Fe),o=_e(r),s=function(e=8){if(e.mui)return e;const t=Ge({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let d=ze({breakpoints:o,direction:"ltr",components:{},palette:je({mode:"light"},n),spacing:s,shape:je({},Ve,a)},l);return d=t.reduce(((e,t)=>ze(e,t)),d),d}();function Je(e=Ye){return Xe(e)}var Ke,Qe,et=w.input(Ke||(Ke=we(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),tt=w.input(Qe||(Qe=we(["\n max-width: 70px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),rt=function(e){var t=Je();return l("div",{style:{display:"flex",flexDirection:"row"},children:[o(tt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),o("div",{style:{width:10}}),o(et,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};rt.propTypes={color:a.string,handleChange:a.func};var nt=function(e){return l(C,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,o(T,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};nt.propTypes={startElement:a.element,endElement:a.element,handleChange:a.func};var it=function(e){return l(h,{variant:"settingsRow",children:[o(Ie,{children:e.settingsLabel}),"checkbox"===e.settingsType&&o(p,xe({},e)),"text"===e.settingsType&&o(Ae,xe({},e)),"boolean"===e.settingsType&&o(qe,xe({},e)),"range"===e.settingsType&&o(nt,xe({},e)),"color"===e.settingsType&&o(rt,xe({},e)),"radio"===e.settingsType&&o(We,xe({location:"inSettings"},e))]})};it.propTypes={settingsLabel:a.string,settingsType:a.oneOf(["checkbox","text","radio","boolean","color"])};var at=function(e){var t,r="ar"===e.lang,i="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":i=o("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":i=o(P,{});break;case"twitter":i=o(k,{});break;case"mada":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":i=o(L,{})}return l(n,xe(xe({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[i,o("div",{style:{width:10}}),o(g,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};at.propTypes={lang:a.string,logo:a.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:a.string};var lt=function(e){return o(n,xe(xe({},e),{},{children:e.children}))},ot=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o(b,{children:e.label}),e.helperText&&o(g,{variant:"validation",children:e.helperText})]}),o(S,xe(xe({},e),{},{children:e.children}))]})},st=function(e){var t=Je();return console.log("theme is ",t),o("label",{children:o("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},dt=function(e){return o(b,{children:o("div",{style:{fontSize:15},children:e.label})})},ut=function(e){return l(c,{severity:e.severity,icon:e.hideIcon,children:[e.title&&o(u,{children:e.title}),e.text]})};ut.propTypes={severity:a.oneOf(["error","info","success","warning"]),title:a.string,text:a.string,hideIcon:a.bool};var ct=function(e){var t="ar"===e.lang;return o(I,{style:{direction:t?"rtl":"ltr"},children:l(W,{"aria-label":"a dense table",children:[o(A,{children:l(q,{children:[e.columns.map((function(e,r){return o(N,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(N,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),o(O,{children:e.rows?e.rows.map((function(r,n){return l(q,{children:[r.map((function(e,r){return o(N,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(N,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return o(R,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):o(q,{align:"center",children:o(N,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&o(q,{children:e.end.map((function(e,r){return o(N,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};ct.propTypes={handleActionClick:a.func,noDataText:a.string,lang:a.string,columns:a.array,rows:a.array,end:a.array};var mt=function(e){return o(Ae,xe({endAdornment:o(j,{position:"start",children:o(z,{})})},e))},pt=function(e){return l(D,{elevation:0,children:[o(M,{expandIcon:o(B,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:o(g,{children:e.title})}),o(G,{children:l(g,{children:[e.content," "]})})]})};pt.propTypes={title:a.string,content:a.string};var ht=function(e){var t=U(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return o(h,{maxWidth:"sm",children:o($,xe(xe({},t),{},{children:l("form",{onSubmit:i(e.handleUpdateProfile),children:[o(_,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Ae,xe({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},a))}}),o(_,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return o(Ae,xe({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),o(_,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Ae,xe({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(_,{control:a,name:"password",render:function(t){var n,i,a=t.field;return o(Ae,xe({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.passwordRequiredText}}),o(_,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return o(Ae,xe({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},gt=function(e){return l(h,{maxWidth:"sm",children:[e.children,o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},ft=function(e){var t=Te(r(!1),2),i=t[0],a=t[1],s=U(),d=s.formState.errors,u=s.handleSubmit,c=s.control;return l(h,{maxWidth:"xs",variant:"auth",children:[i&&o(ut,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?o(Ie,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):o($,xe(xe({},s),{},{children:l("form",{onSubmit:u((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[o(_,{control:c,name:"password",render:function(t){var r,n,i=t.field;return o(Ae,xe({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:o(V,{position:"start",children:o(F,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),o(_,{control:c,name:"confirmPassword",render:function(t){var r,n,i=t.field;return o(Ae,xe({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:o(V,{position:"start",children:o(F,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};ft.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,passwordPlaceholder:a.string,updatePassword:a.string,passwordRequiredText:a.string,passwordLabel:a.string,confirmPasswordPlaceholder:a.string,confirmPasswordLabel:a.string,confirmPasswordRequiredText:a.string,passwordMatchError:a.string,forgotPasswordText:a.string,passwordChanged:a.string}),passwordChanged:a.bool,handleNewPassword:a.func};var vt=function(e){var t=U(),r=t.formState.errors,i=t.handleSubmit;t.register;var a=t.control;return o(h,{maxWidth:"xs",variant:"auth",children:e.sent?o(Ie,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):l("form",{onSubmit:i(e.handleResetPassword),children:[o(_,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Ae,xe({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(V,{position:"start",children:o(Z,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};vt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,emailSentText:a.string,resetPassword:a.string}),sent:a.bool,handleResetPassword:a.func};var xt=function(e){var t=U(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&o(ut,{title:e.errorTitle,text:e.errorText,severity:"error"}),o($,xe(xe({},t),{},{children:l("form",{onSubmit:i(e.handleSignUp),children:[o(_,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Ae,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:o(V,{position:"start",children:o(H,{})})})},rules:{required:e.texts.fullNameRequiredText}}),o(_,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Ae,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(V,{position:"start",children:o(Z,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(_,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Ae,xe({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(V,{position:"start",children:o(F,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(n,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(g,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",o("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),o(X,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(at,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&o(at,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&o(at,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};xt.propTypes={texts:a.shape({fullNameLabel:a.string,fullNamePlaceholder:a.string,fullNameRequiredText:a.string,emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,passwordTooShortText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,existingUserText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignUp:a.func,handleRouteToSignIn:a.func,handleGoogleSignUp:a.func,handleGithubSignUp:a.func,handleTwitterSignUp:a.func};var bt=function(e){var t=U(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&o(ut,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:i(e.handleSignIn),children:[o(_,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Ae,xe({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(V,{position:"start",children:o(Z,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(_,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Ae,xe({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(V,{position:"start",children:o(F,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(g,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l(g,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",o("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),o(X,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(at,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&o(at,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&o(at,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};bt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignIn:a.func,handleRouteToSignUp:a.func,handleGoogleSignIn:a.func,handleGithubSignIn:a.func,handleTwitterSignIn:a.func};var yt=function(e){return l(h,{maxWidth:"xs",children:[o(Ie,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&o(at,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&o(at,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&o(at,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&o(at,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&o(at,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&o(at,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&o(at,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};yt.propTypes={viaMada:a.bool,viaWallet:a.bool,viaSTCPay:a.bool,viaPayPal:a.bool,viaApplePay:a.bool,viaCreditCard:a.bool,madaLabel:a.string,stcPayLabel:a.string,paypalLabel:a.string,walletLabel:a.string,applePayLabel:a.string,visaMasterLabel:a.string,handleMada:a.func,handleWallet:a.func,handleSTCPay:a.func,handlePayPal:a.func,handleApplePay:a.func,handleCreditCard:a.func};var wt=function(e){var t,r=U(),i=r.formState.errors,a=r.handleSubmit,s=r.control;return o(h,{maxWidth:"xs",children:l("form",{onSubmit:a(e.handle),children:[o(Ae,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message}),o(_,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Ae,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(_,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Ae,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(_,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Ae,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},Tt=function(e){var t=Te(r(0),2),i=t[0],a=t[1],s=U(),d=s.formState.errors,u=s.handleSubmit,c=s.control;return l(h,{maxWidth:"xs",children:[l(g,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(i).toLocaleString("en")||"0",o(g,{children:e.currency||"SAR"})]}),o($,xe(xe({},s),{},{children:l("form",{onSubmit:u(e.handleChargeWallet),children:[o(_,{control:c,name:"amount",render:function(t){var r,n,i=t.field;return o(Ae,xe(xe({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),a(e.target.value)},helperText:null===(n=d.amount)||void 0===n?void 0:n.message}))},rules:{required:e.texts.amountRequired}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.chargeWallet})]})}))]})};Tt.propTypes={texts:a.shape({amountLabel:a.string,chargeWallet:a.string,amountRequired:a.string}),handleChargeWallet:a.func,currency:a.string};var Ct=function(e){return l(h,{maxWidth:"xs",children:[o(g,{align:"center",children:"Wallet Balance"}),l(g,{align:"center",variant:"h1",children:[e.walletBalance||"0",o(g,{children:e.currency||"SAR"})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},Pt=function(e){var t,r,i,a,s,d,u,c,m,p,f="ar"===e.lang,v=U(),x=v.formState.errors,b=v.handleSubmit;v.register;var y=v.control,w={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l(h,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(ct,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(X,{variant:"middle"}),o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),o($,xe(xe({},v),{},{children:l("form",{onSubmit:b(e.handlePayNow),children:[l(h,{sx:w,children:[o(_,{control:y,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=x.firstName)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(_,{control:y,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=x.lastName)||void 0===i?void 0:i.message},a))}})]}),o(_,{control:y,name:"email",render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=x.email)||void 0===i?void 0:i.message},a))},rules:{required:null===(i=e.texts)||void 0===i?void 0:i.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),l(h,{sx:w,children:[o(_,{control:y,name:"streetAddress",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=x.streetAddress)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(_,{control:y,name:"buildingNumber",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=x.buildingNumber)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(_,{control:y,name:"province",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=x.province)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(_,{control:y,name:"city",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=x.city)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(_,{control:y,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return o(Ae,xe({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=x.zipCode)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(_,{control:y,name:"country",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return l(ot,xe(xe({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=a.value)&&void 0!==n?n:"",helperText:null===(i=x.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},a),{},{children:[o("option",{}),e.countriesList.map((function(e,t){return o("option",{children:e},t)}))]}))}})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};Pt.propTypes={texts:a.shape({orderDetails:a.string,billingAddress:a.string,payNow:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string}),lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var kt=function(e){var t="ar"===e.lang;return l("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l(h,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[o(g,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),o(X,{variant:"middle"}),l(g,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",o("strong",{children:e.userEmail})]}),o(g,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),o(g,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),o(X,{variant:"middle"}),e.products&&l(s,{children:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(ct,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(X,{variant:"middle"})]}),o(n,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),o(n,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),o(n,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),o(g,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),o("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:o(g,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};kt.propTypes={texts:a.shape({print:a.string,history:a.string,homePage:a.string,successMessage:a.string,orderDetails:a.string,fasterPaymentNote:a.string,billingAddress:a.string,payNow:a.string,yourOrderNumber:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string,refundPolicy:a.string}),products:a.array,countriesList:a.array,lang:a.string,total:a.string,userEmail:a.string,orderNumber:a.string,confirmationTitle:a.string,handleHome:a.func,handlePrint:a.func,handleHistory:a.func,handleRefundPolicyLink:a.func};var Lt=function(e){return o("div",{children:e.children})},St=function(e){var t=E();return o(ue,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l(ce,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o("div",{style:{width:10}}),o(g,{textAlign:"center",children:e.label})]},e.label)}))})};St.propTypes={anchor:a.any,handleClose:a.func,menuItems:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var Wt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Ot=function(e){return be({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(8)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},Nt=Y("div")((function(e){var t=e.theme;return xe({display:"flex",alignItems:"center",justifyContent:"rtl"===e.direction?"flex-start":"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),It=Y(ee,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return xe({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:"rtl"===n?0:240,marginRight:"rtl"===n?240:0,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),At=Y(Q,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return xe(xe({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&xe(xe({},Wt(t)),{},{"& .MuiDrawer-paper":Wt(t)})),!r&&xe(xe({},Ot(t)),{},{"& .MuiDrawer-paper":Ot(t)}))}));function qt(e){var r=J(),n=Te(t.useState(!0),2),a=n[0],s=n[1],d="ar"===e.lang,u=Te(t.useState(null),2);u[0],u[1];var c=Te(t.useState(null),2),m=c[0],p=c[1];return l(K,{sx:{display:"flex",direction:d?"rtl":"ltr"},children:[o(It,{variant:"appbar",position:"fixed",open:a,direction:d?"rtl":"ltr",children:l(te,{variant:"appbar",sx:{paddingLeft:{xs:3},paddingRight:{xs:3}},children:[o(ne,{color:"inherit","aria-label":"open drawer",onClick:function(){return s(!0)},edge:"start",s:!0,sx:xe({marginRight:5},a&&{display:"none"}),children:o(ie,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[o(g,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l(K,{children:[o(i,{title:"Open settings",children:o(ne,{onClick:function(e){return p(e.currentTarget)},sx:{p:0},size:"small",children:o(de,{})})}),o(St,{menuItems:e.accountMenu,anchor:m,handleClose:function(){return p(null)}})]})]})]})}),l(At,{variant:"permanent",open:a,children:[l(Nt,{direction:d?"rtl":"ltr",children:[e.logo,o(ne,{onClick:function(){return s(!1)},children:"rtl"===r.direction?o(le,{}):o(ae,{})})]}),o(X,{}),o(re,{children:e.pages.map((function(t,r){var n,s;return o(i,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l(oe,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(s=t.slug)||void 0===s?void 0:s.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:a?"initial":"center",px:2.5},children:[o(t.icon,{}),o("div",{style:{width:20}}),o(se,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l(K,{sx:{flexGrow:1,p:3},children:[o(Nt,{}),e.children]})]})}var Rt=["children","onClose","hideClose"],jt=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=ye(e,Rt);return l(fe,xe(xe({sx:{m:0,p:2}},i),{},{children:[t,n?null:o(ne,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:o(me,{})})]}))};function Et(e){var t=Te(r(!1),2);return t[0],t[1],l(pe,xe(xe({},e),{},{variant:"main",children:[o(jt,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),o(ge,{children:e.children}),o(he,{children:e.actions})]}))}var zt=function(e){var r=E(),a=Te(t.useState(null),2),s=a[0],d=a[1],u=Te(t.useState(null),2),c=u[0],m=u[1],p=function(){return d(null)};return console.log("theme is ",r),o(ee,{position:"static",variant:"appbar",children:o(h,{variant:"appbar",children:l(te,{disableGutters:!0,children:[o(K,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.logo}),l(K,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[o(ne,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:function(e){return d(e.currentTarget)},color:"inherit",children:o(ie,{})}),o(St,{anchor:s,handleClose:p,menuItems:e.pages})]}),o(K,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:e.logo}),o(K,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.pages.map((function(e){return o(n,{onClick:p,sx:{my:2,display:"block"},children:e.label},e)}))}),l(K,{sx:{flexGrow:0},children:[o(i,{title:"Open settings",children:o(ne,{onClick:function(e){return m(e.currentTarget)},sx:{p:0},children:o(de,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(St,{anchor:c,handleClose:function(e){return m(null)},menuItems:e.accountMenu})]})]})})})};zt.propTypes={pages:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func})),accountMenu:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};export{ke as ActionButton,Pe as AdaptiveButton,Lt as Box,Tt as ChargeWalletForm,Pt as CheckoutForm,kt as ConfirmationPage,wt as CreditCardForm,pt as HawaAccordian,ut as HawaAlert,zt as HawaAppBar,qt as HawaAppLayout,lt as HawaButton,Se as HawaCheckbox,rt as HawaColorPicker,Et as HawaDialog,dt as HawaInputLabel,Oe as HawaItemCard,at as HawaLogoButton,Ne as HawaPricingCard,We as HawaRadio,nt as HawaRange,mt as HawaSearchBar,ot as HawaSelect,it as HawaSettingsRow,Le as HawaSnackbar,ct as HawaTable,st as HawaTextArea,Ae as HawaTextField,Ie as HawaTypography,ft as NewPasswordForm,Ct as PayWithWallet,vt as ResetPasswordForm,yt as SelectPayment,bt as SignInForm,xt as SignUpForm,ht as UserProfileForm,gt as UserSettingsForm};
|
|
1
|
+
import*as e from"react";import t,{useState as r,useEffect as n}from"react";import i from"@mui/material/Button";import a from"@mui/material/Tooltip";import l from"prop-types";import{jsxs as o,jsx as s,Fragment as d}from"react/jsx-runtime";import c from"@mui/material/Snackbar";import u from"@mui/material/AlertTitle";import m from"@mui/material/Alert";import{IconButton as p,Button as h,InputAdornment as g,Container as f,Typography as v,Stack as b,useTheme as x}from"@mui/material";import y from"@mui/icons-material/Close";import w from"@mui/material/FormControlLabel";import T from"@mui/material/Checkbox";import C from"@mui/material/Container";import P from"@mui/material/Typography";import k from"@mui/icons-material/CheckCircleOutlined";import L from"@mui/material/Chip";import S from"@mui/material/Input";import O from"@mui/material/InputLabel";import W from"@mui/material/Switch";import A from"@emotion/styled";import I from"@mui/material/Slider";import R from"@mui/material/Stack";import N from"@mui/icons-material/GitHub";import q from"@mui/icons-material/Twitter";import B from"@mui/icons-material/AccountBalanceWallet";import j from"@mui/material/Select";import D from"@mui/material/Table";import z from"@mui/material/TableBody";import E from"@mui/material/TableCell";import M from"@mui/material/TableContainer";import U from"@mui/material/TableHead";import G from"@mui/material/TableRow";import{Search as F,MoreVert as $}from"@mui/icons-material";import _ from"@mui/icons-material/ExpandMore";import V from"@mui/material/Accordion";import Z from"@mui/material/AccordionSummary";import H from"@mui/material/AccordionDetails";import{useDropzone as Y}from"react-dropzone";import{useForm as X,FormProvider as J,Controller as K}from"react-hook-form";import Q from"@mui/material/InputAdornment";import ee from"@mui/icons-material/HttpsOutlined";import te from"@mui/icons-material/MailOutline";import re from"@mui/icons-material/PermIdentityOutlined";import ne from"@mui/material/Divider";import{styled as ie,useTheme as ae}from"@mui/material/styles";import le from"@mui/material/Box";import oe from"@mui/material/Drawer";import se from"@mui/material/CssBaseline";import de from"@mui/material/AppBar";import ce from"@mui/material/Toolbar";import ue from"@mui/material/List";import me from"@mui/material/IconButton";import pe from"@mui/icons-material/Menu";import he from"@mui/icons-material/ChevronLeft";import ge from"@mui/icons-material/ChevronRight";import fe from"@mui/material/ListItem";import ve from"@mui/material/ListItemIcon";import be from"@mui/material/ListItemText";import xe from"@mui/icons-material/MoveToInbox";import ye from"@mui/icons-material/Mail";import we from"@mui/material/Dialog";import Te from"@mui/material/DialogActions";import Ce from"@mui/material/DialogContent";import Pe from"@mui/material/DialogTitle";import ke from"@mui/material/Avatar";import Le from"@mui/material/Menu";import Se from"@mui/material/MenuItem";function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){Ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ie(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Re(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){o=!0,i=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Be=function(e){return e.showText?o(i,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,s("div",{style:{width:10}}),e.buttonText]}):s(a,{title:e.buttonText,placement:"top",children:s(i,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};Be.propTypes={buttonText:l.string,onClick:l.func,showText:l.bool};var je=function(e){return s(i,We(We({},e),{},{children:e.text}))},De=function(e){var t=Ne(r({vertical:"",horizontal:""}),2),i=t[0],a=t[1];return n((function(){if(e.position){var t=e.position.split("-");a({vertical:t[0],horizontal:t[1]})}}),[e.position]),s(c,{open:e.open,autoHideDuration:e.duration?e.duration:null,onClose:e.handleClose,anchorOrigin:i,action:s(d,{children:s(p,{"aria-label":"close",style:{color:"black"},sx:{p:.5},onClick:e.handleClose,children:s(y,{})})}),children:o(m,{icon:!1,severity:e.severity,onClose:e.isClosable?e.handleClose:null,children:[e.title&&s(u,{children:e.title}),e.text]})})},ze=function(e){return console.log("props : ",e),s(t.Fragment,{children:s(w,{label:e.label,control:s(T,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},Ee=function(e){var t=Ne(r(e.defaultValue),2),n=t[0],a=t[1];return s(C,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var l;return s(i,{onClick:function(){e.handleChange(t.value),a(t.value)},fullWidth:!0,variant:(null==n?void 0:n.toLowerCase())===(null===(l=t.value)||void 0===l?void 0:l.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};Ee.propTypes={lang:l.string,options:l.arrayOf(l.shape({label:l.string,value:l.string})),defaultValue:l.string,handleChange:l.func,location:l.string};var Me=function(e){var t="ar"===e.lang;return o(C,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&o(C,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&s("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&s(C,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&s(C,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Me.propTypes={lang:l.string,onCardClick:l.func};var Ue=function(e){var t,r,n="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},l={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={usd:n?"دولار":"$",sar:n?"ريال":"SAR"},c=n?e.features_ar:e.features,u=n?{left:10}:{right:10};return o(C,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:n?"rtl":"ltr"},children:[o(C,{variant:"plan-header",children:[e.discount&&s(L,{label:e.discount,variant:"standard",style:We({maxWidth:"fit-content",position:"absolute",bottom:10},u),color:"success"}),s(P,{variant:"h3",fontWeight:500,children:n?e.title_ar:e.title}),s(P,{variant:"caption",children:n?e.subtitle_ar:e.subtitle}),s("br",{}),s(P,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?o("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[o("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,s("div",{style:{width:5}}),s(P,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),s(P,{style:{fontSize:14,margin:5},children:n?a[e.cycleText]:l[e.cycleText]})]}):o("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[o("div",{style:{display:"flex",flexDirection:"row"},children:[s(P,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),s("div",{style:{width:5}}),e.price]}),s(P,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:l[e.cycleText]})]})})]}),s("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return o("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[s("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:s(k,{fontSize:"small"})}),s("div",{style:{width:10}}),s(P,{variant:"subtitle2",children:e})]})}))}),s(i,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ue.propTypes={lang:l.string,buttonText:l.string,selectedPlan:l.string,title:l.string,title_ar:l.string,subtitle:l.string,subtitle_ar:l.string,features:l.array,features_ar:l.array,currency:l.oneOf(["sar","usd"]),cycleText:l.oneOf(["monthly","3-months","6-months","annually"])};var Ge=function(e){return s(P,We(We({},e),{},{children:e.children}))},Fe=function(e){return s("div",{style:e.inForm&&{width:"100%"},children:o("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&s(O,{children:e.label}),e.helperText&&s(P,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),s(S,We({disableUnderline:!0},e))]})})},$e=function(e){return s(W,We({},e))};var _e="production"!==process.env.NODE_ENV?l.oneOfType([l.number,l.string,l.object,l.array]):{};function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ve.apply(this,arguments)}function Ze(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function He(e,t,r={clone:!0}){const n=r.clone?Ve({},e):e;return Ze(e)&&Ze(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Ze(t[i])&&i in e&&Ze(e[i])?n[i]=He(e[i],t[i],r):n[i]=t[i])})),n}const Ye=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Xe=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Je=[...Ye,...Xe];function Ke(e){return function(e,t,r,n){const i=(a=e,((l=t)&&"string"==typeof l?l.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,l;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Qe(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Ye.reduce(((e,t)=>(e[t]=_e,e)),{}),"production"===process.env.NODE_ENV||Xe.reduce(((e,t)=>(e[t]=_e,e)),{}),"production"===process.env.NODE_ENV||Je.reduce(((e,t)=>(e[t]=_e,e)),{});const et=["values","unit","step"];function tt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=Qe(e,et),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Ve({},e,{[t.key]:t.val})),{})})(t),l=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,i){const a=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[l[a]]?t[l[a]]:i)-n/100}${r})`}return Ve({keys:l,values:a,up:o,down:s,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(e,l[l.indexOf(e)+1]):o(e)},not:function(e){const t=l.indexOf(e);return 0===t?o(l[1]):t===l.length-1?s(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var rt={borderRadius:4};const nt=["breakpoints","palette","spacing","shape"];const it=e.createContext(null);"production"!==process.env.NODE_ENV&&(it.displayName="ThemeContext");var at=it;function lt(t=null){const r=function(){const t=e.useContext(at);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const ot=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=Qe(e,nt),o=tt(r),s=function(e=8){if(e.mui)return e;const t=Ke({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let d=He({breakpoints:o,direction:"ltr",components:{},palette:Ve({mode:"light"},n),spacing:s,shape:Ve({},rt,a)},l);return d=t.reduce(((e,t)=>He(e,t)),d),d}();function st(e=ot){return lt(e)}var dt,ct,ut=A.input(dt||(dt=Re(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),mt=A.input(ct||(ct=Re(["\n max-width: 70px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),pt=function(e){var t=st();return o("div",{style:{display:"flex",flexDirection:"row"},children:[s(mt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),s("div",{style:{width:10}}),s(ut,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};pt.propTypes={color:l.string,handleChange:l.func};var ht=function(e){return o(R,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,s(I,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};ht.propTypes={startElement:l.element,endElement:l.element,handleChange:l.func};var gt=function(e){return o(C,{variant:"settingsRow",children:[s(Ge,{children:e.settingsLabel}),"checkbox"===e.settingsType&&s(T,We({},e)),"text"===e.settingsType&&s(Fe,We({},e)),"boolean"===e.settingsType&&s($e,We({},e)),"range"===e.settingsType&&s(ht,We({},e)),"color"===e.settingsType&&s(pt,We({},e)),"radio"===e.settingsType&&s(Ee,We({location:"inSettings"},e))]})};gt.propTypes={settingsLabel:l.string,settingsType:l.oneOf(["checkbox","text","radio","boolean","color"])};var ft=function(e){var t,r="ar"===e.lang,n="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":n=s("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":n=s(N,{});break;case"twitter":n=s(q,{});break;case"mada":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":n=s("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":n=s(B,{})}return o(i,We(We({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[n,s("div",{style:{width:10}}),s(P,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};ft.propTypes={lang:l.string,logo:l.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:l.string};var vt=function(e){return s(i,We(We({},e),{},{children:e.children}))},bt=function(e){return o("div",{style:{width:"100%"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[s(O,{children:e.label}),e.helperText&&s(P,{variant:"validation",children:e.helperText})]}),s(j,We(We({},e),{},{children:e.children}))]})},xt=function(e){var t=st();return console.log("theme is ",t),s("label",{children:s("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},yt=function(e){return s(O,{children:s("div",{style:{fontSize:15},children:e.label})})},wt=function(e){return o(m,{severity:e.severity,icon:e.hideIcon,children:[e.title&&s(u,{children:e.title}),e.text]})};wt.propTypes={severity:l.oneOf(["error","info","success","warning"]),title:l.string,text:l.string,hideIcon:l.bool};var Tt=function(e){var t="ar"===e.lang;return s(M,{style:{direction:t?"rtl":"ltr"},children:o(D,{"aria-label":"a dense table",children:[s(U,{children:o(G,{children:[e.columns.map((function(e,r){return s(E,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&s(E,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),s(z,{children:e.rows?e.rows.map((function(r,n){return o(G,{children:[r.map((function(e,r){return s(E,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&s(E,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return s(h,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):s(G,{align:"center",children:s(E,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&s(G,{children:e.end.map((function(e,r){return s(E,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};Tt.propTypes={handleActionClick:l.func,noDataText:l.string,lang:l.string,columns:l.array,rows:l.array,end:l.array};var Ct=function(e){return s(Fe,We({endAdornment:s(g,{position:"start",children:s(F,{})})},e))},Pt=function(e){return o(V,{elevation:0,children:[s(Z,{expandIcon:s(_,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:s(P,{children:e.title})}),s(H,{children:o(P,{children:[e.content," "]})})]})};Pt.propTypes={title:l.string,content:l.string};var kt={display:"flex",flexDirection:"row",flexWrap:"wrap",marginTop:10},Lt=function(e){var t,i,a,l,d=e.texts,c=e.files,u=e.setFiles;e.setDeletedFiles;var m=e.maxFiles,g=e.accept;e.onAcceptedFiles;var b=e.showPreview,x=e.onDeleteFile,w=e.onClearFiles,T=e.maxSize;e.errorMessages;var C=Ne(r(0),2),P=C[0],k=C[1],L=Ne(r(0),2),S=L[0],O=L[1],W=st(),A=Y({multiple:!0,accept:g,maxSize:T,maxFiles:m,onDrop:function(e){u(e.map((function(e,t){return Object.assign(e,{preview:URL.createObjectURL(e)})})))}}),I=A.getRootProps,R=A.getInputProps,N=A.fileRejections,q=A.acceptedFiles,B=A.isDragActive;n((function(){return function(){null==c||c.forEach((function(e){URL.revokeObjectURL(e.preview)}))}}),[c]),n((function(){u(q)}),[q,P]),w=function(){q.length=0,q.splice(0,q.length),u([])},n((function(){if(T>0){var e=Math.floor(Math.log(T)/Math.log(1024));O(parseFloat((T/Math.pow(1024,e)).toFixed(2))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][e])}}),[T]);var j=N.map((function(e,t){return o("div",{children:[s("div",{children:e.file.name}),s("div",{children:e.errors[0].code})]},t)})),D=null==c?void 0:c.map((function(e,t){return o("div",{style:{position:"relative",margin:10},children:[s(p,{onClick:function(t){t.stopPropagation(),q.splice(q.indexOf(e),1),k(Math.random),x(e)},size:"small",variant:"contained",style:{position:"absolute",top:-10,right:-10,backgroundColor:W.primaryActionColor,color:"white",padding:3},children:s(y,{fontSize:"small"})}),s("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",height:100,width:100,backgroundImage:"url(".concat(e.preview,")"),backgroundSize:"cover",backgroundPosition:"center",border:"1px solid black"}},e.name)]})}));return console.log("error",N),o(f,We(We({variant:"drop-area"},I({style:{backgroundColor:B&&"white"}})),{},{children:[s("input",We({},R())),s(v,{children:"Click here or drop files here to upload"}),o(v,{children:["Max file size is ",S]}),q.length>0&&s(h,{style:{color:"black"},onClick:function(e){e.stopPropagation(),w()},children:"Clear All"}),D&&b?s("aside",{style:kt,children:D}):null,"too-many-files"===(null===(t=N[0])||void 0===t||null===(i=t.errors[0])||void 0===i?void 0:i.code)?s(wt,{text:d.tooManyFiles,severity:"error"}):"file-too-large"===(null===(a=N[0])||void 0===a||null===(l=a.errors[0])||void 0===l?void 0:l.code)?s(wt,{text:d.fileTooLarge,severity:"error"}):j]}))},St=function(e){return o(b,{variant:"card",direction:"row",maxWidth:e.maxWidth,style:{paddingLeft:5},children:[s("div",{style:{display:"flex",alignItems:"center",borderRight:"1px solid grey",marginRight:20},children:s($,{})}),s("div",{style:{width:"100%"},children:e.children})]})},Ot=function(e){var t=X(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return s(C,{maxWidth:"sm",children:s(J,We(We({},t),{},{children:o("form",{onSubmit:n(e.handleUpdateProfile),children:[s(K,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return s(Fe,We({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},a))}}),s(K,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return s(Fe,We({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Fe,We({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(K,{control:a,name:"password",render:function(t){var n,i,a=t.field;return s(Fe,We({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.passwordRequiredText}}),s(K,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return s(Fe,We({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.confirmPasswordRequiredText}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},Wt=function(e){return o(C,{maxWidth:"sm",children:[e.children,s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},At=function(e){var t=Ne(r(!1),2),n=t[0],a=t[1],l=X(),d=l.formState.errors,c=l.handleSubmit,u=l.control;return o(C,{maxWidth:"xs",variant:"auth",children:[n&&s(wt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?s(Ge,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):s(J,We(We({},l),{},{children:o("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[s(K,{control:u,name:"password",render:function(t){var r,n,i=t.field;return s(Fe,We({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),s(K,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return s(Fe,We({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};At.propTypes={texts:l.shape({emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,passwordPlaceholder:l.string,updatePassword:l.string,passwordRequiredText:l.string,passwordLabel:l.string,confirmPasswordPlaceholder:l.string,confirmPasswordLabel:l.string,confirmPasswordRequiredText:l.string,passwordMatchError:l.string,forgotPasswordText:l.string,passwordChanged:l.string}),passwordChanged:l.bool,handleNewPassword:l.func};var It=function(e){var t=X(),r=t.formState.errors,n=t.handleSubmit;t.register;var a=t.control;return s(C,{maxWidth:"xs",variant:"auth",children:e.sent?s(Ge,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):o("form",{onSubmit:n(e.handleResetPassword),children:[s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Fe,We({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(Q,{position:"start",children:s(te,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};It.propTypes={texts:l.shape({emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,emailInvalidText:l.string,emailSentText:l.string,resetPassword:l.string}),sent:l.bool,handleResetPassword:l.func};var Rt=function(e){var t=X(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return o(C,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&s(wt,{title:e.errorTitle,text:e.errorText,severity:"error"}),s(J,We(We({},t),{},{children:o("form",{onSubmit:n(e.handleSignUp),children:[s(K,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return s(Fe,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:s(Q,{position:"start",children:s(re,{})})})},rules:{required:e.texts.fullNameRequiredText}}),s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Fe,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(Q,{position:"start",children:s(te,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(K,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return s(Fe,We({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),s(i,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),o(P,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",s("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),s(ne,{}),o("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&s(ft,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&s(ft,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&s(ft,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};Rt.propTypes={texts:l.shape({fullNameLabel:l.string,fullNamePlaceholder:l.string,fullNameRequiredText:l.string,emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,emailInvalidText:l.string,passwordLabel:l.string,passwordPlaceholder:l.string,passwordRequiredText:l.string,passwordTooShortText:l.string,forgotPasswordText:l.string,newUserText:l.string,signUpText:l.string,signInText:l.string,existingUserText:l.string,googleButtonLabel:l.string,githubButtonLabel:l.string,twitterButtonLabel:l.string}),viaGoogle:l.bool,viaGithub:l.bool,viaTwitter:l.bool,handleSignUp:l.func,handleRouteToSignIn:l.func,handleGoogleSignUp:l.func,handleGithubSignUp:l.func,handleTwitterSignUp:l.func};var Nt=function(e){var t=X(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return o(C,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&s(wt,{title:e.errorTitle,text:e.errorText,severity:"error"}),o("form",{onSubmit:n(e.handleSignIn),children:[s(K,{control:a,name:"email",render:function(t){var n,i,a=t.field;return s(Fe,We({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:s(Q,{position:"start",children:s(te,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),s(K,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return s(Fe,We({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:s(Q,{position:"start",children:s(ee,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),s(P,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),o(P,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",s("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),s(ne,{}),o("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&s(ft,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&s(ft,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&s(ft,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};Nt.propTypes={texts:l.shape({emailLabel:l.string,emailPlaceholder:l.string,emailRequiredText:l.string,emailInvalidText:l.string,passwordLabel:l.string,passwordPlaceholder:l.string,passwordRequiredText:l.string,forgotPasswordText:l.string,newUserText:l.string,signUpText:l.string,signInText:l.string,googleButtonLabel:l.string,githubButtonLabel:l.string,twitterButtonLabel:l.string}),viaGoogle:l.bool,viaGithub:l.bool,viaTwitter:l.bool,handleSignIn:l.func,handleRouteToSignUp:l.func,handleGoogleSignIn:l.func,handleGithubSignIn:l.func,handleTwitterSignIn:l.func};var qt=function(e){return o(C,{maxWidth:"xs",children:[s(Ge,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&s(ft,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&s(ft,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&s(ft,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&s(ft,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&s(ft,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&s(ft,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&s(ft,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};qt.propTypes={viaMada:l.bool,viaWallet:l.bool,viaSTCPay:l.bool,viaPayPal:l.bool,viaApplePay:l.bool,viaCreditCard:l.bool,madaLabel:l.string,stcPayLabel:l.string,paypalLabel:l.string,walletLabel:l.string,applePayLabel:l.string,visaMasterLabel:l.string,handleMada:l.func,handleWallet:l.func,handleSTCPay:l.func,handlePayPal:l.func,handleApplePay:l.func,handleCreditCard:l.func};var Bt=function(e){var t,r=X(),n=r.formState.errors,a=r.handleSubmit,l=r.control;return s(C,{maxWidth:"xs",children:o("form",{onSubmit:a(e.handle),children:[s(Fe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),s(K,{control:l,name:"cardName",render:function(e){var t;return e.field,s(Fe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(K,{control:l,name:"cardName",render:function(e){var t;return e.field,s(Fe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(K,{control:l,name:"cardName",render:function(e){var t;return e.field,s(Fe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},jt=function(e){var t=Ne(r(0),2),n=t[0],a=t[1],l=X(),d=l.formState.errors,c=l.handleSubmit,u=l.control;return o(C,{maxWidth:"xs",children:[o(P,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(n).toLocaleString("en")||"0",s(P,{children:e.currency||"SAR"})]}),s(J,We(We({},l),{},{children:o("form",{onSubmit:c(e.handleChargeWallet),children:[s(K,{control:u,name:"amount",render:function(t){var r,n,i=t.field;return s(Fe,We(We({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),a(e.target.value)},helperText:null===(n=d.amount)||void 0===n?void 0:n.message}))},rules:{required:e.texts.amountRequired}}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.chargeWallet})]})}))]})};jt.propTypes={texts:l.shape({amountLabel:l.string,chargeWallet:l.string,amountRequired:l.string}),handleChargeWallet:l.func,currency:l.string};var Dt=function(e){return o(C,{maxWidth:"xs",children:[s(P,{align:"center",children:"Wallet Balance"}),o(P,{align:"center",variant:"h1",children:[e.walletBalance||"0",s(P,{children:e.currency||"SAR"})]}),s(i,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},zt=function(e){var t,r,n,a,l,d,c,u,m,p,h="ar"===e.lang,g=X(),f=g.formState.errors,v=g.handleSubmit;g.register;var b=g.control,x={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return o(C,{maxWidth:"sm",style:{direction:h?"rtl":"ltr"},children:[s(P,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),s(Tt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),s(ne,{variant:"middle"}),s(P,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),s(J,We(We({},g),{},{children:o("form",{onSubmit:v(e.handlePayNow),children:[o(C,{sx:x,children:[s(K,{control:b,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=f.firstName)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=f.lastName)||void 0===i?void 0:i.message},a))}})]}),s(K,{control:b,name:"email",render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=f.email)||void 0===i?void 0:i.message},a))},rules:{required:null===(n=e.texts)||void 0===n?void 0:n.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),o(C,{sx:x,children:[s(K,{control:b,name:"streetAddress",rules:{required:null===(l=e.texts)||void 0===l?void 0:l.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=f.streetAddress)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"buildingNumber",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=f.buildingNumber)||void 0===i?void 0:i.message},a))}})]}),o(C,{sx:x,children:[s(K,{control:b,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=f.province)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=f.city)||void 0===i?void 0:i.message},a))}})]}),o(C,{sx:x,children:[s(K,{control:b,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return s(Fe,We({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=f.zipCode)||void 0===i?void 0:i.message},a))}}),s("div",{style:{width:20}}),s(K,{control:b,name:"country",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return o(bt,We(We({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=a.value)&&void 0!==n?n:"",helperText:null===(i=f.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},a),{},{children:[s("option",{}),e.countriesList.map((function(e,t){return s("option",{children:e},t)}))]}))}})]}),s(i,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};zt.propTypes={texts:l.shape({orderDetails:l.string,billingAddress:l.string,payNow:l.string,emailLabel:l.string,emailRequiredText:l.string,emailInvalidText:l.string,firstNameLabel:l.string,required:l.string,lastNameLabel:l.string,streetAddressLabel:l.string,buildingNumberLabel:l.string,cityLabel:l.string,stateLabel:l.string,countryLabel:l.string,zipCodeLabel:l.string}),lang:l.string,countriesList:l.array,products:l.array,total:l.string,handlePayNow:l.func};var Et=function(e){var t="ar"===e.lang;return o("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[o(C,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[s(P,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),s(ne,{variant:"middle"}),o(P,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",s("strong",{children:e.userEmail})]}),s(P,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),s(P,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),s(ne,{variant:"middle"}),e.products&&o(d,{children:[s(P,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),s(Tt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),s(ne,{variant:"middle"})]}),s(i,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),s(i,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),s(i,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),s(P,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),s("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:s(P,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};Et.propTypes={texts:l.shape({print:l.string,history:l.string,homePage:l.string,successMessage:l.string,orderDetails:l.string,fasterPaymentNote:l.string,billingAddress:l.string,payNow:l.string,yourOrderNumber:l.string,emailLabel:l.string,emailRequiredText:l.string,emailInvalidText:l.string,firstNameLabel:l.string,required:l.string,lastNameLabel:l.string,streetAddressLabel:l.string,buildingNumberLabel:l.string,cityLabel:l.string,stateLabel:l.string,countryLabel:l.string,zipCodeLabel:l.string,refundPolicy:l.string}),products:l.array,countriesList:l.array,lang:l.string,total:l.string,userEmail:l.string,orderNumber:l.string,confirmationTitle:l.string,handleHome:l.func,handlePrint:l.func,handleHistory:l.func,handleRefundPolicyLink:l.func};var Mt=function(e){var t=Ne(r("sar"),2),n=t[0],i=t[1],a=Ne(r("monthly"),2),l=a[0],d=a[1];return o(C,{style:{width:"fit-content"},variant:"plain",children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:10},children:[s(Ee,{location:"inPricing",handleChange:function(e){return d(e)},defaultValue:"monthly",options:[{label:"Monthly",value:"monthly"},{label:"3 Months",value:"3-months"},{label:"6 Months",value:"6-months"},{label:"Annually",value:"annually"}]}),s(Ee,{location:"inPricing",handleChange:function(e){i(e)},defaultValue:"sar",options:[{label:"USD",value:"usd"},{label:"SAR",value:"sar"}]})]}),s(C,{variant:"pricing",children:e.plans.map((function(t){return s(Ue,We(We({lang:e.lang},t),{},{currency:n,cycleText:l}))}))})]})};Mt.propTypes={plans:l.arrayOf(l.shape({title:l.string,title_ar:l.string,subtitle:l.string,subtitle_ar:l.string,price:l.number,currency:l.string,cycleText:l.string,buttonText:l.string,features:l.array,features_ar:l.array,selectedPlan:l.bool})),lang:l.string};var Ut=function(e){return s("div",{children:e.children})},Gt=ie("main",{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return We({flexGrow:1,padding:t.spacing(3),transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),marginLeft:"rtl"===n?0:"-".concat(240,"px"),marginRight:"rtl"===n?"-".concat(240,"px"):0},r&&{transition:t.transitions.create("margin",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen}),marginLeft:"ltr"===n&&0,marginRight:"rtl"===n&&0})})),Ft=ie(de,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return We({transition:t.transitions.create(["margin","width"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{width:"calc(100% - ".concat(240,"px)"),marginLeft:"rtl"===n?0:"".concat(240,"px"),marginRight:"rtl"===n?"".concat(240,"px"):0,transition:t.transitions.create(["margin","width"],{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen})})})),$t=ie("div")((function(e){var t=e.theme;return We(We({display:"flex",alignItems:"center",padding:t.spacing(0,1)},t.mixins.toolbar),{},{justifyContent:"flex-end"})})),_t=function(t){var r=ae(),n=Ne(e.useState(!1),2),i=n[0],a=n[1],l="ar"===t.lang,c=function(){a(!0)},u=function(){a(!1)};return o(le,{sx:{display:"flex"},children:[s(se,{}),s(Ft,{position:"fixed",open:i,direction:l?"rtl":"ltr",style:{alignItems:l?"flex-end":"flex-start",justifyContent:"center"},children:s(ce,{children:o(d,l?{children:[s(P,{variant:"h6",noWrap:!0,component:"div",children:"Persistent drawer"}),s(me,{color:"inherit","aria-label":"open drawer",onClick:c,edge:l?"end":"start",sx:We({mr:2},i&&{display:"none"}),children:s(pe,{})})]}:{children:[s(me,{color:"inherit","aria-label":"open drawer",onClick:c,edge:l?"end":"start",sx:We({marginRight:l?0:2,marginLeft:l?2:0},i&&{display:"none"}),children:s(pe,{})}),s(P,{variant:"h6",noWrap:!0,component:"div",children:"Persistent drawer"})]})})}),o(d,l?{children:[o(Gt,{open:i,direction:l?"rtl":"ltr",children:[s($t,{}),t.children]}),o(oe,{sx:{width:240,flexShrink:0,"& .MuiDrawer-paper":{width:240,boxSizing:"border-box"}},variant:"persistent",anchor:l?"right":"left",open:i,children:[s($t,{children:s(me,{onClick:u,children:"ltr"===r.direction?s(he,{}):s(ge,{})})}),s(ne,{}),s(ue,{children:["Inbox","Starred","Send email","Drafts"].map((function(e,t){return o(fe,{button:!0,children:[s(ve,{children:s(t%2==0?xe:ye,{})}),s(be,{primary:e})]},e)}))}),s(ne,{}),s(ue,{children:["All mail","Trash","Spam"].map((function(e,t){return o(fe,{button:!0,children:[s(ve,{children:s(t%2==0?xe:ye,{})}),s(be,{primary:e})]},e)}))})]})]}:{children:[o(oe,{sx:{width:240,flexShrink:0,"& .MuiDrawer-paper":{width:240,boxSizing:"border-box"}},variant:"persistent",anchor:l?"right":"left",open:i,children:[s($t,{children:s(me,{onClick:u,children:"ltr"===r.direction?s(he,{}):s(ge,{})})}),s(ne,{}),s(ue,{children:["Inbox","Starred","Send email","Drafts"].map((function(e,t){return o(fe,{button:!0,children:[s(ve,{children:s(t%2==0?xe:ye,{})}),s(be,{primary:e})]},e)}))}),s(ne,{}),s(ue,{children:["All mail","Trash","Spam"].map((function(e,t){return o(fe,{button:!0,children:[s(ve,{children:s(t%2==0?xe:ye,{})}),s(be,{primary:e})]},e)}))})]}),o(Gt,{open:i,direction:l?"rtl":"ltr",children:[s($t,{}),t.children]})]})]})},Vt=["children","onClose","hideClose"],Zt=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=Ie(e,Vt);return o(Pe,We(We({sx:{m:0,p:2}},i),{},{children:[t,n?null:s(me,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:s(y,{})})]}))};function Ht(e){var t=Ne(r(!1),2);return t[0],t[1],o(we,We(We({},e),{},{variant:"main",children:[s(Zt,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),s(Ce,{children:e.children}),s(Te,{children:e.actions})]}))}var Yt=function(e){var t=x();return s(Le,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return o(Se,{onClick:e.action,children:[e.icon&&s(e.icon,{}),e.icon&&s("div",{style:{width:10}}),s(P,{textAlign:"center",children:e.label})]},e.label)}))})};Yt.propTypes={anchor:l.any,handleClose:l.func,menuItems:l.arrayOf(l.shape({icon:l.element,label:l.string,action:l.func}))};var Xt=function(e){var r=x(),n=Ne(t.useState(null),2),l=n[0],d=n[1],c=Ne(t.useState(null),2),u=c[0],m=c[1],p=function(){return d(null)};return console.log("theme is ",r),s(de,{position:"static",variant:"appbar",children:s(C,{variant:"appbar",children:o(ce,{disableGutters:!0,children:[s(le,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.logo}),o(le,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[s(me,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:function(e){return d(e.currentTarget)},color:"inherit",children:s(pe,{})}),s(Yt,{anchor:l,handleClose:p,menuItems:e.pages})]}),s(le,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:e.logo}),s(le,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.pages.map((function(e){return s(i,{onClick:p,sx:{my:2,display:"block"},children:e.label},e)}))}),o(le,{sx:{flexGrow:0},children:[s(a,{title:"Open settings",children:s(me,{onClick:function(e){return m(e.currentTarget)},sx:{p:0},children:s(ke,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),s(Yt,{anchor:u,handleClose:function(e){return m(null)},menuItems:e.accountMenu})]})]})})})};Xt.propTypes={pages:l.arrayOf(l.shape({icon:l.element,label:l.string,action:l.func})),accountMenu:l.arrayOf(l.shape({icon:l.element,label:l.string,action:l.func}))};var Jt=function(e){var r=Ne(t.useState(null),2),n=r[0],i=r[1];return o(f,We(We({variant:"page-controls"},e),{},{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[s(h,{variant:"layout",onClick:e.backAction,children:e.backText}),s(b,{direction:"row",spacing:1,sx:{display:{xs:"none",md:"flex"}},children:e.actionButtons.map((function(e){return s(h,{variant:"layout",children:e.label})}))}),o(b,{direction:"row",spacing:1,sx:{display:{xs:"flex",md:"none"}},children:[s(h,{variant:"layout",onClick:function(e){return i(e.currentTarget)},children:s(pe,{})}),s(Yt,{handleClose:function(e){return i(null)},anchor:n,menuItems:e.actionButtons})]})]}))};Jt.propTypes={backText:l.string,backAction:l.func,actionButtons:l.arrayOf(l.shape({label:l.string,action:l.func}))};export{je as ActionButton,Be as AdaptiveButton,Ut as Box,jt as ChargeWalletForm,zt as CheckoutForm,Et as ConfirmationPage,Bt as CreditCardForm,Lt as DragDropImages,St as DraggableCard,Pt as HawaAccordian,wt as HawaAlert,Xt as HawaAppBar,_t as HawaAppLayout,vt as HawaButton,ze as HawaCheckbox,pt as HawaColorPicker,Ht as HawaDialog,yt as HawaInputLabel,Me as HawaItemCard,ft as HawaLogoButton,Jt as HawaPageControls,Ue as HawaPricingCard,Ee as HawaRadio,ht as HawaRange,Ct as HawaSearchBar,bt as HawaSelect,gt as HawaSettingsRow,De as HawaSnackbar,Tt as HawaTable,xt as HawaTextArea,Fe as HawaTextField,Ge as HawaTypography,At as NewPasswordForm,Dt as PayWithWallet,Mt as PricingPlans,It as ResetPasswordForm,qt as SelectPayment,Nt as SignInForm,Rt as SignUpForm,Ot as UserProfileForm,Wt as UserSettingsForm};
|