@artibet/react-mui-components 3.8.19 → 3.8.20
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/package.json +1 -1
- package/properties/index.js +1 -1
package/package.json
CHANGED
package/properties/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{TextField as t,Autocomplete as r,Chip as n,Dialog as o,Zoom as i,DialogTitle as a,Stack as l,Box as s,Typography as c,Divider as d,DialogContent as u,DialogActions as m,Button as f,CircularProgress as v,DialogContentText as p,ListItem as x,Grid2 as g,Link as b,Paper as h,List as E}from"@mui/material";import{router as y}from"@inertiajs/react";import{EditNoteRounded as S,ErrorOutline as W,Edit as w,ToggleOff as C,ToggleOn as z,DeleteOutline as q,Upload as T}from"@mui/icons-material";import{Controller as L,useForm as R}from"react-hook-form";import{yupResolver as k}from"@hookform/resolvers/yup";import*as I from"yup";import"react-color";import{format as F,parseISO as P,toDate as j}from"date-fns";import{el as O}from"date-fns/locale";import"axios";import{NumericFormat as V}from"react-number-format";import{AdapterDateFns as D}from"@mui/x-date-pickers/AdapterDateFnsV3";import{LocalizationProvider as K}from"@mui/x-date-pickers/LocalizationProvider";import{DateTimePicker as M,renderDigitalClockTimeView as B,DatePicker as N,TimePicker as H}from"@mui/x-date-pickers";import A from"date-fns/locale/el";import U from"@mui/icons-material/WarningAmberRounded";import _ from"@mui/icons-material/ErrorOutlineRounded";import Y from"@mui/icons-material/CheckCircleOutlineRounded";function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Z(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G.apply(null,arguments)}function J(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 Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){Z(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function X(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ee(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){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(e,t):void 0}}(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.")}()}var te=["form","name","label","maxLength","required","disabled","autofocus","showErrors","readonly","readonlyBackgroundColor","bold"],re=function(r){var n=r.form,o=r.name,i=r.label,a=r.maxLength,l=void 0===a?255:a,s=r.required,c=void 0!==s&&s,d=r.disabled,u=void 0!==d&&d,m=r.autofocus,f=void 0!==m&&m,v=r.showErrors,p=void 0===v||v,x=r.readonly,g=void 0!==x&&x,b=r.readonlyBackgroundColor,h=void 0===b?"#dddddd":b,E=r.bold,y=void 0!==E&&E,S=X(r,te),W=n.control,w=n.formState.errors;return e.createElement(L,{name:o,control:W,rules:{required:c,disabled:u},render:function(r){var n,a,s=r.field,d=s.onChange,m=s.onBlur,v=s.value;return e.createElement(t,G({required:c,label:i,value:v,onChange:d,onBlur:m,error:p&&Boolean(null===(n=w[o])||void 0===n?void 0:n.message),fullWidth:!0,helperText:p&&(null===(a=w[o])||void 0===a?void 0:a.message),variant:"outlined",disabled:u,autoFocus:f,slotProps:{input:{maxLength:l,readOnly:g,sx:{fontWeight:y?"bold":"",backgroundColor:g?h:""}}}},S))}})},ne=["form","name","label","maxLength","required","disabled","autofocus","showErrors","readonly","readonlyBackgroundColor","bold"],oe=function(r){var n=r.form,o=r.name,i=void 0===o?"email":o,a=r.label,l=void 0===a?"E-mail":a,s=r.maxLength,c=void 0===s?255:s,d=r.required,u=void 0===d||d,m=r.disabled,f=void 0!==m&&m,v=r.autofocus,p=void 0!==v&&v,x=r.showErrors,g=void 0===x||x,b=r.readonly,h=void 0!==b&&b,E=r.readonlyBackgroundColor,y=void 0===E?"#dddddd":E,S=r.bold,W=void 0!==S&&S,w=X(r,ne),C=n.control,z=n.formState.errors;return e.createElement(L,{name:i,control:C,rules:{required:u,disabled:f},render:function(r){var n,o,a=r.field,s=a.onChange,d=a.onBlur,m=a.value;return e.createElement(t,G({required:u,label:l,value:m,onChange:s,onBlur:d,error:g&&Boolean(null===(n=z[i])||void 0===n?void 0:n.message),fullWidth:!0,helperText:g&&(null===(o=z[i])||void 0===o?void 0:o.message),variant:"outlined",disabled:f,autoFocus:p,slotProps:{input:{maxLength:c,readOnly:h,sx:{fontWeight:W?"bold":"",backgroundColor:h?y:""}}}},w))}})},ie=["form","name","label","required","disabled","options","valueKey","labelKey","maxLength","autofocus","noOptionsText","showErrors","size","readonly","readonlyBackgroundColor","bold"],ae=function(n){var o=n.form,i=n.name,a=n.label,l=n.required,s=void 0!==l&&l,c=n.disabled,d=void 0!==c&&c,u=n.options,m=void 0===u?[]:u,f=n.valueKey,v=void 0===f?"id":f,p=n.labelKey,x=void 0===p?"label":p,g=n.maxLength,b=void 0===g?255:g,h=n.autofocus,E=void 0!==h&&h,y=n.noOptionsText,S=void 0===y?"Δεν υπάρχουν επιλογές":y,W=n.showErrors,w=void 0===W||W,C=n.size,z=void 0===C?"medium":C,q=n.readonly,T=void 0!==q&&q,R=n.readonlyBackgroundColor,k=void 0===R?"#dddddd":R,I=n.bold,F=void 0!==I&&I,P=X(n,ie),j=ee(e.useState(null),2),O=j[0],V=j[1],D=o.watch(i);e.useEffect((function(){V(m.find((function(e){return e[v]===D}))||null)}),[D]);var K=o.control,M=o.formState.errors;return e.createElement(L,{name:i,control:K,rules:{required:s,disabled:d},render:function(n){var o=n.field,l=o.onChange,c=o.onBlur;return o.value,T?e.createElement(t,{size:z,label:a,fullWidth:!0,required:s,slotProps:{input:{maxLength:b,readOnly:T,sx:{fontWeight:F?"bold":"",backgroundColor:T?k:""}}},value:O?O.label:""}):e.createElement(r,{value:O,required:s,onChange:function(e,t){return l(t?t[v]:null)},options:m,isOptionEqualToValue:function(e,t){return e[v]===t[v]},noOptionsText:S,getOptionLabel:function(e){return e[x]},size:z,slotProps:{input:{maxLength:b,sx:{fontWeight:F?"bold":"",color:"red"}}},renderInput:function(r){var n,o;return e.createElement(t,G({label:a,required:s,disabled:d,autoFocus:E,size:z,error:w&&Boolean(null===(n=M[i])||void 0===n?void 0:n.message),onBlur:c,variant:"outlined",fullWidth:!0,helperText:w&&(null===(o=M[i])||void 0===o?void 0:o.message)},r,P))}})}})},le=function(e){return null!=e&&""!==e},se=function(e){return null==(t=e)||""===t?"":new Intl.NumberFormat("el-GR",{style:"currency",currency:"EUR"}).format(e);var t},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return e?F(P(e,{locale:O}),"dd".concat(t,"MM").concat(t,"yyyy")):""},de=["form","name","label","required","disabled","options","valueKey","labelKey","maxLength","autofocus","noOptionsText","showErrors"],ue=function(o){var i=o.form,a=o.name,l=o.label,s=o.required,c=void 0!==s&&s,d=o.disabled,u=void 0!==d&&d,m=o.options,f=void 0===m?[]:m,v=o.valueKey,p=void 0===v?"id":v,x=o.labelKey,g=void 0===x?"label":x,b=o.maxLength,h=void 0===b?255:b,E=o.autofocus,y=void 0!==E&&E,S=o.noOptionsText,W=void 0===S?"Δεν υπάρχουν επιλογές":S,w=o.showErrors,C=void 0===w||w,z=X(o,de),q=ee(e.useState([]),2),T=q[0],R=q[1],k=i.watch(a);e.useEffect((function(){R(f.filter((function(e){return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return Boolean(t.find((function(t){return t[r]===e[r]})))}(e,k)})))}),[k]);var I=i.control,F=i.formState.errors;return e.createElement(L,{name:a,control:I,rules:{required:c,disabled:u},render:function(o){var i=o.field,s=i.onChange,d=i.onBlur;return i.value,e.createElement(r,{multiple:!0,value:T,required:c,onChange:function(e,t){return s(t)},options:f,isOptionEqualToValue:function(e,t){return e[p]===t[p]},noOptionsText:W,renderTags:function(t,r){return t.map((function(t,o){return e.createElement(n,G({variant:"outlined",label:t[g],size:"small"},r({index:o})))}))},renderInput:function(r){var n,o;return e.createElement(t,G({label:l,required:c,disabled:u,autoFocus:y,inputProps:{maxLength:h},error:C&&Boolean(null===(n=F[a])||void 0===n?void 0:n.message),onBlur:d,variant:"outlined",fullWidth:!0,helperText:C&&(null===(o=F[a])||void 0===o?void 0:o.message)},r,z))}})}})},me=["form","name","label","rows","required","disabled","autofocus","showErrors"],fe=function(r){var n=r.form,o=r.name,i=r.label,a=r.rows,l=void 0===a?5:a,s=r.required,c=void 0!==s&&s,d=r.disabled,u=void 0!==d&&d,m=r.autofocus,f=void 0!==m&&m,v=r.showErrors,p=void 0===v||v,x=X(r,me),g=n.control,b=n.formState.errors;return e.createElement(L,{name:o,control:g,rules:{required:c,disabled:u},render:function(r){var n,a,s=r.field,d=s.onChange,m=s.onBlur,v=s.value;return e.createElement(t,G({required:c,label:i,value:v,multiline:!0,minRows:l,maxRows:l,onChange:d,onBlur:m,error:p&&Boolean(null===(n=b[o])||void 0===n?void 0:n.message),fullWidth:!0,helperText:p&&(null===(a=b[o])||void 0===a?void 0:a.message),variant:"outlined",disabled:u,autoFocus:f},x))}})},ve=["form","name","label","required","disabled","autofocus","showErrors","readonly","readonlyBackgroundColor","bold"],pe=function(r){var n=r.form,o=r.name,i=r.label,a=r.required,l=void 0!==a&&a,s=r.disabled,c=void 0!==s&&s;r.autofocus;var d=r.showErrors,u=void 0===d||d,m=r.readonly,f=void 0!==m&&m,v=r.readonlyBackgroundColor,p=void 0===v?"#dddddd":v,x=r.bold,g=void 0!==x&&x,b=X(r,ve),h=n.control,E=n.formState.errors,y=function(e,t){""===e.value?n.setValue(o,null):n.setValue(o,e.floatValue)};return e.createElement(L,{name:o,control:h,rules:{required:l,disabled:c},render:function(r){var n,a,s=r.field;s.onChange,s.onBlur;var d=s.value;return e.createElement(V,G({customInput:t,variant:"outlined",label:i,required:l,disabled:c,value:d,thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,allowNegative:!1,onValueChange:y,error:u&&Boolean(null===(n=E[o])||void 0===n?void 0:n.message),helperText:u&&(null===(a=E[o])||void 0===a?void 0:a.message),fullWidth:!0,slotProps:{input:{readOnly:f,sx:{fontWeight:g?"bold":"",backgroundColor:f?p:""}}}},b))}})},xe=["form","name","label","required","disabled","autofocus","showErrors","ampm","singleTimeColumn","hoursStep","minutesStep","secondsStep"],ge=function(t){var r=t.form,n=t.name,o=t.label,i=t.required,a=void 0!==i&&i,l=t.disabled,s=void 0!==l&&l;t.autofocus;var c=t.showErrors,d=void 0===c||c,u=t.ampm,m=void 0!==u&&u,f=t.singleTimeColumn,v=void 0===f||f,p=t.hoursStep,x=void 0===p?1:p,g=t.minutesStep,b=void 0===g?15:g,h=t.secondsStep,E=void 0===h?30:h,y=X(t,xe),S=r.control,W=r.formState.errors;return e.createElement(K,{dateAdapter:D,adapterLocale:A,localeText:{fieldDayPlaceholder:function(e){return"ΗΗ"},fieldMonthPlaceholder:function(e){return"ΜΜ"},fieldYearPlaceholder:function(e){return"EEEE"},fieldHoursPlaceholder:function(e){return"ΩΩ"},fieldMinutesPlaceholder:function(e){return"ΛΛ"},fieldClearLabel:"Καθαρισμός"}},e.createElement(L,{name:n,control:S,rules:{required:a,disabled:s},render:function(t){var r,i,l=t.field;return e.createElement(M,{label:o,value:l.value?j(l.value):null,format:"dd/MM/yyyy HH:mm",inputFormat:!0,views:v?["year","month","day","hours"]:["year","month","day","hours","minutes"],ampm:m,onChange:function(e){return l.onChange(e)},viewRenderers:v?{hours:B}:null,timeSteps:{hours:x,minutes:b,seconds:E},slotProps:{field:{clearable:!0,onClear:function(){return l.onChange(null)}},textField:Q(Q({},y),{},{required:a,error:d&&Boolean(null===(r=W[n])||void 0===r?void 0:r.message),helperText:d&&(null===(i=W[n])||void 0===i?void 0:i.message),variant:"outlined",fullWidth:!0})}})}}))},be=["form","name","label","required","disabled","autofocus","showErrors"],he=function(t){var r=t.form,n=t.name,o=t.label,i=t.required,a=void 0!==i&&i,l=t.disabled,s=void 0!==l&&l;t.autofocus;var c=t.showErrors,d=void 0===c||c,u=X(t,be),m=r.control,f=r.formState.errors;return e.createElement(K,{dateAdapter:D,adapterLocale:A,localeText:{fieldDayPlaceholder:function(e){return"ΗΗ"},fieldMonthPlaceholder:function(e){return"ΜΜ"},fieldYearPlaceholder:function(e){return"EEEE"},fieldClearLabel:"Καθαρισμός"}},e.createElement(L,{name:n,control:m,rules:{required:a,disabled:s},render:function(t){var r,i,l=t.field;return e.createElement(N,{label:o,value:l.value?j(l.value):null,format:"dd/MM/yyyy",inputFormat:!0,onChange:function(e){return l.onChange(e)},slotProps:{field:{clearable:!0,onClear:function(){return l.onChange(null)}},textField:Q(Q({},u),{},{required:a,error:d&&Boolean(null===(r=f[n])||void 0===r?void 0:r.message),helperText:d&&(null===(i=f[n])||void 0===i?void 0:i.message),variant:"outlined",fullWidth:!0})}})}}))},Ee=["form","name","label","allowNegative","required","disabled","autofocus","showErrors"],ye=function(r){var n=r.form,o=r.name,i=r.label,a=r.allowNegative,l=void 0!==a&&a,s=r.required,c=void 0!==s&&s,d=r.disabled,u=void 0!==d&&d,m=r.autofocus,f=void 0!==m&&m,v=r.showErrors,p=void 0===v||v,x=X(r,Ee),g=n.control,b=n.formState.errors,h=function(e,t){""===e.value?n.setValue(o,null):n.setValue(o,e.floatValue)};return e.createElement(L,{name:o,control:g,rules:{required:c,disabled:u},render:function(r){var n,a,s=r.field;s.onChange,s.onBlur;var d=s.value;return e.createElement(V,G({customInput:t,variant:"outlined",label:i,required:c,disabled:u,value:d,thousandSeparator:!1,decimalSeparator:",",decimalScale:0,fixedDecimalScale:!0,allowNegative:l,onValueChange:h,error:p&&Boolean(null===(n=b[o])||void 0===n?void 0:n.message),helperText:p&&(null===(a=b[o])||void 0===a?void 0:a.message),fullWidth:!0,autoFocus:f},x))}})},Se=["form","name","label","ampm","hoursStep","minutesStep","secondsStep","singleTimeColumn","required","disabled","autofocus","showErrors"],We=function(t){var r=t.form,n=t.name,o=t.label,i=t.ampm,a=void 0!==i&&i,l=t.hoursStep,s=void 0===l?1:l,c=t.minutesStep,d=void 0===c?15:c,u=t.secondsStep,m=void 0===u?30:u,f=t.singleTimeColumn,v=void 0===f||f,p=t.required,x=void 0!==p&&p,g=t.disabled,b=void 0!==g&&g;t.autofocus;var h=t.showErrors,E=void 0===h||h,y=X(t,Se),S=r.control,W=r.formState.errors;return e.createElement(K,{dateAdapter:D,adapterLocale:A,localeText:{fieldDayPlaceholder:function(e){return"ΗΗ"},fieldMonthPlaceholder:function(e){return"ΜΜ"},fieldYearPlaceholder:function(e){return"EEEE"},fieldHoursPlaceholder:function(e){return"ΩΩ"},fieldMinutesPlaceholder:function(e){return"ΛΛ"}}},e.createElement(L,{name:n,control:S,rules:{required:x,disabled:b},render:function(t){var r,i,l=t.field;return e.createElement(H,{label:o,value:l.value?j(l.value):null,format:"HH:mm",inputFormat:!0,views:v?["hours"]:["hours","minutes"],ampm:a,onChange:function(e){return l.onChange(e)},viewRenderers:v?{hours:B}:null,timeSteps:{hours:s,minutes:d,seconds:m},slotProps:{textField:Q(Q({},y),{},{required:x,error:E&&Boolean(null===(r=W[n])||void 0===r?void 0:r.message),helperText:E&&(null===(i=W[n])||void 0===i?void 0:i.message),variant:"outlined",fullWidth:!0})}})}}))},we=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.maxLength,P=void 0===F?255:F,j=t.message,O=void 0===j?null:j,V=t.isLoading,D=void 0!==V&&V,K={text:x||""},M=I.object({text:W?I.string().max(P,"Παρακαλώ πληκτρολογείστε μέχρι ".concat(P," χαρακτήρες")).required(C):I.string().max(P)}),B=R({defaultValues:K,resolver:k(M)});e.useEffect((function(){r&&(B.reset(K),B.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),O&&"string"==typeof O?e.createElement(c,{variant:"caption",color:"text.secondary"},O):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:B.handleSubmit((function(e){return g(e.text)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},O&&"string"!=typeof O&&e.createElement(s,{sx:{mb:2}},O),e.createElement(re,{form:B,name:"text",label:p,required:W,autofocus:!0,maxLength:P,sx:{mt:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},D?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},Ce=/^$|^(([^<>()\[\]\\.,;:\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,}))$/,ze=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.invalidMessage,q=void 0===z?"Μη έγκυρη μορφή email":z,T=t.okLabel,L=void 0===T?"ΚΑΤΑΧΩΡΗΣΗ":T,F=t.cancelLabel,P=void 0===F?"ΑΚΥΡΩΣΗ":F,j=t.maxLength,O=void 0===j?255:j,V=t.message,D=void 0===V?null:V,K=t.isLoading,M=void 0!==K&&K,B={email:x||""},N=I.object({email:W?I.string().matches(Ce,q).required(C):I.string().matches(Ce,q)}),H=R({defaultValues:B,resolver:k(N)});e.useEffect((function(){r&&(H.reset(B),H.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),D&&"string"==typeof D?e.createElement(c,{variant:"caption",color:"text.secondary"},D):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:H.handleSubmit((function(e){return g(e.email)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},D&&"string"!=typeof D&&e.createElement(s,{sx:{mb:2}},D),e.createElement(oe,{form:H,label:p,required:W,autofocus:!0,maxLength:O,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},P),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},M?e.createElement(v,{size:20,sx:{color:"inherit"}}):L))))};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".chrome-picker {\r\n -webkit-box-shadow: none !important;\r\n -moz-box-shadow: none !important;\r\n box-shadow: none !important;\r\n}");var qe=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.options,E=void 0===h?[]:h,y=t.valueKey,W=void 0===y?"id":y,w=t.labelKey,C=void 0===w?"label":w,z=t.required,q=void 0===z||z,T=t.size,L=void 0===T?"sm":T,F=t.requiredMessage,P=void 0===F?"Υποχρεωτικό πεδίο":F,j=t.okLabel,O=void 0===j?"ΚΑΤΑΧΩΡΗΣΗ":j,V=t.cancelLabel,D=void 0===V?"ΑΚΥΡΩΣΗ":V,K=t.message,M=void 0===K?null:K,B=t.isLoading,N=void 0!==B&&B,H={field:x||null},A=I.object({field:q?I.string().required(P):I.string().nullable()}),U=R({defaultValues:H,resolver:k(A)});e.useEffect((function(){r&&(U.reset(H),U.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:L,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),M&&"string"==typeof M?e.createElement(c,{variant:"caption",color:"text.secondary"},M):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:U.handleSubmit((function(e){return g(e)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},M&&"string"!=typeof M&&e.createElement(s,{sx:{mb:2}},M),e.createElement(ae,{form:U,name:"field",label:p,options:E,valueKey:W,labelKey:C,required:q,autofocus:!0,size:"medium",sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},D),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},N?e.createElement(v,{size:20,sx:{color:"inherit"}}):O))))},Te=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=void 0===x?[]:x,b=t.onSubmit,h=t.onCancel,E=t.options,y=void 0===E?[]:E,W=t.valueKey,w=void 0===W?"id":W,C=t.labelKey,z=void 0===C?"label":C,q=t.required,T=void 0===q||q,L=t.size,F=void 0===L?"sm":L,P=t.requiredMessage,j=void 0===P?"Επιλέξτε τουλάχιστον μία τιμή":P,O=t.okLabel,V=void 0===O?"ΚΑΤΑΧΩΡΗΣΗ":O,D=t.cancelLabel,K=void 0===D?"ΑΚΥΡΩΣΗ":D,M=t.message,B=void 0===M?null:M,N=t.isLoading,H=void 0!==N&&N,A={field:g||[]},U=I.object({field:T?I.array().min(1,j):I.array()}),_=R({defaultValues:A,resolver:k(U)});e.useEffect((function(){r&&(_.reset(A),_.clearErrors())}),[r,g]);return e.createElement(o,{fullWidth:!0,maxWidth:F,open:r,onClose:function(e,t){"escapeKeyDown"===t&&h()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),B&&"string"==typeof B?e.createElement(c,{variant:"caption",color:"text.secondary"},B):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:_.handleSubmit((function(e){return b(e)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},B&&"string"!=typeof B&&e.createElement(s,{sx:{mb:2}},B),e.createElement(ue,{form:_,name:"field",label:p,options:y,valueKey:w,labelKey:z,required:T,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),h()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},K),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},H?e.createElement(v,{size:20,sx:{color:"inherit"}}):V))))},Le=function(t){var r=t.open,n=t.title,l=t.message,c=t.onConfirm,d=t.onCancel,x=t.confirmText,g=void 0===x?"ΕΠΙΒΕΒΑΙΩΣΗ":x,b=t.cancelText,h=void 0===b?"ΑΚΥΡΩΣΗ":b,E=t.isLoading,y=void 0!==E&&E,S=t.type,W=void 0===S?"warning":S,w={warning:{color:"warning.main",icon:e.createElement(U,{sx:{fontSize:40}})},error:{color:"error.main",icon:e.createElement(_,{sx:{fontSize:40}})},success:{color:"success.main",icon:e.createElement(Y,{sx:{fontSize:40}})}}[W]||{color:"primary.main",icon:null};return e.createElement(o,{open:r,onClose:function(e,t){"backdropClick"!==t&&d()},slots:{transition:i},slotProps:{backdrop:{sx:{backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(4px)"}},paper:{sx:{borderRadius:4,padding:1,maxWidth:400,textAlign:"center",backgroundImage:"none"}}}},e.createElement(s,{sx:{display:"flex",flexDirection:"column",alignItems:"center",mt:3}},e.createElement(s,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:70,height:70,bgcolor:"".concat(w.color,"20"),color:w.color,borderRadius:"50%",mb:2}},w.icon),e.createElement(a,{sx:{fontWeight:800,fontSize:"1.35rem",pt:0,pb:1}},n)),e.createElement(u,null,e.createElement(p,{sx:{color:"text.secondary",fontWeight:500,lineHeight:1.6}},l)),e.createElement(m,{sx:{justifyContent:"center",gap:2,px:3,pb:3,mt:1}},e.createElement(f,{fullWidth:!0,variant:"text",color:"inherit",onClick:d,sx:{borderRadius:3,fontWeight:700,color:"text.disabled"}},h),e.createElement(f,{fullWidth:!0,variant:"contained",disableElevation:!0,color:"error"===W?"error":"primary",onClick:c,sx:{borderRadius:3,fontWeight:700,py:1}},y?e.createElement(v,{size:20,sx:{color:"inherit"}}):g)))},Re=function(t){var r=t.open,n=t.title,p=t.label,x=t.message,g=void 0===x?null:x,b=t.value,h=t.onSubmit,E=t.onCancel,y=t.size,W=void 0===y?"sm":y,w=t.rows,C=void 0===w?5:w,z=t.required,q=void 0!==z&&z,T=t.requiredMessage,L=void 0===T?"Υποχρεωτικό πεδίο":T,F=t.okLabel,P=void 0===F?"ΚΑΤΑΧΩΡΗΣΗ":F,j=t.cancelLabel,O=void 0===j?"ΑΚΥΡΩΣΗ":j,V=t.isLoading,D=void 0!==V&&V,K={notes:b||""},M=I.object({notes:q?I.string().required(L):I.string()}),B=R({defaultValues:K,resolver:k(M)});e.useEffect((function(){r&&(B.reset(K),B.clearErrors())}),[r,b]);return e.createElement(o,{fullWidth:!0,maxWidth:W,open:r,onClose:function(e,t){"escapeKeyDown"===t&&E()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),g&&"string"==typeof g?e.createElement(c,{variant:"caption",color:"text.secondary"},g):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:B.handleSubmit((function(e){return h(e.notes)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},g&&"string"!=typeof g&&e.createElement(s,{sx:{mb:2}},g),e.createElement(fe,{form:B,name:"notes",label:p,required:q,rows:C,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),E()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},O),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},D?e.createElement(v,{size:20,sx:{color:"inherit"}}):P))))},ke=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.minValue,C=void 0===w?null:w,z=t.maxValue,q=void 0===z?null:z,T=t.requiredMessage,L=void 0===T?"Υποχρεωτικό πεδίο":T,F=t.okLabel,P=void 0===F?"ΚΑΤΑΧΩΡΗΣΗ":F,j=t.cancelLabel,O=void 0===j?"ΑΚΥΡΩΣΗ":j,V=t.message,D=void 0===V?null:V,K=t.isLoading,M=void 0!==K&&K,B={poso:le(x)?x:null},N=I.object({poso:I.number().when([],{is:function(e){return W},then:function(e){return e.required(L)},otherwise:function(e){return e.nullable(!0)}}).when([],{is:function(e){return null!==C},then:function(e){return e.min(C,"Το ποσό πρέπει να είναι μεγαλύτερο ή ίσο από ".concat(se(C)))},otherwise:function(e){return e}}).when([],{is:function(e){return null!==q},then:function(e){return e.max(q,"Το ποσό πρέπει να είναι μικρότερο ή ίσο από ".concat(se(q)))},otherwise:function(e){return e}})}),H=R({defaultValues:B,resolver:k(N)});e.useEffect((function(){r&&(H.reset(B),H.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),D&&"string"==typeof D?e.createElement(c,{variant:"caption",color:"text.secondary"},D):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:H.handleSubmit((function(e){return g(e.poso)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},e.createElement(pe,{form:H,name:"poso",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},O),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},M?e.createElement(v,{size:20,sx:{color:"inherit"}}):P))))},Ie=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.message,P=void 0===F?null:F,j=t.isLoading,O=void 0!==j&&j,V={datetime:x},D=I.object({datetime:W?I.date().typeError("Μη έγκυρη μορφή ημερομηνίας/ώρας").required(C):I.date().typeError("Μη έγκυρη μορφή ημερομηνίας/ώρας").nullable()}),K=R({defaultValues:V,resolver:k(D)});e.useEffect((function(){r&&(K.reset(V),K.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),P&&"string"==typeof P?e.createElement(c,{variant:"caption",color:"text.secondary"},P):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:K.handleSubmit((function(e){return g(e.datetime)})),noValidate:!0},e.createElement(u,null,P&&"string"!=typeof P&&e.createElement(s,{sx:{mb:2}},P),e.createElement(ge,{form:K,name:"datetime",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},O?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},Fe=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.message,P=void 0===F?null:F,j=t.isLoading,O=void 0!==j&&j,V={datetime:x},D=I.object({datetime:W?I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").required(C):I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").nullable()}),K=R({defaultValues:V,resolver:k(D)});e.useEffect((function(){r&&(K.reset(V),K.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),P&&"string"==typeof P?e.createElement(c,{variant:"caption",color:"text.secondary"},P):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:K.handleSubmit((function(e){return g(e.datetime)})),noValidate:!0},e.createElement(u,null,P&&"string"!=typeof P&&e.createElement(s,{sx:{mb:2}},P),e.createElement(he,{form:K,name:"datetime",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},O?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},Pe=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.allowNegative,E=void 0!==h&&h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.size,q=void 0===z?"sm":z,T=t.minValue,L=void 0===T?null:T,F=t.maxValue,P=void 0===F?null:F,j=t.okLabel,O=void 0===j?"ΚΑΤΑΧΩΡΗΣΗ":j,V=t.cancelLabel,D=void 0===V?"ΑΚΥΡΩΣΗ":V,K=t.message,M=void 0===K?null:K,B=t.isLoading,N=void 0!==B&&B,H={num:le(x)?x:null},A=I.object({num:I.number().when([],{is:function(e){return W},then:function(e){return e.required(C)},otherwise:function(e){return e.nullable(!0)}}).when([],{is:function(e){return null!==L},then:function(e){return e.min(L,"Η τιμή πρέπει να είναι μεγαλύτερη ή ίση από ".concat(L))},otherwise:function(e){return e}}).when([],{is:function(e){return null!==P},then:function(e){return e.max(P,"Η τιμή πρέπει να είναι μικρότερη ή ίση από ".concat(P))},otherwise:function(e){return e}})}),U=R({defaultValues:H,resolver:k(A)});e.useEffect((function(){r&&(U.reset(H),U.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:q,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),M&&"string"==typeof M?e.createElement(c,{variant:"caption",color:"text.secondary"},M):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:U.handleSubmit((function(e){return g(e.num)})),noValidate:!0},e.createElement(u,null,e.createElement(ye,{form:U,name:"num",label:p,required:W,autofocus:!0,allowNegative:E,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},D),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},N?e.createElement(v,{size:20,sx:{color:"inherit"}}):O))))},je=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.message,P=void 0===F?null:F,j=t.isLoading,O=void 0!==j&&j,V={datetime:x},D=I.object({datetime:W?I.date().typeError("Μη έγκυρη μορφή ώρας").required(C):I.date().typeError("Μη έγκυρη μορφή ώρας")}),K=R({defaultValues:V,resolver:k(D)});e.useEffect((function(){r&&(K.reset(V),K.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),P&&"string"==typeof P?e.createElement(c,{variant:"caption",color:"text.secondary"},P):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:K.handleSubmit((function(e){return g(e.datetime)})),noValidate:!0},e.createElement(u,null,P&&"string"!=typeof P&&e.createElement(s,{sx:{mb:2}},P),e.createElement(We,{form:K,name:"datetime",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},O?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},Oe=function(t){var r=t.open,n=t.title,p=t.registrationNumber,x=t.registrationDate,g=t.registrationNumberLabel,b=void 0===g?"Αριθμός Πρωτοκόλλου":g,h=t.registrationDateLabel,E=void 0===h?"Ημερομηνία Πρωτοκόλλου":h,y=t.onSubmit,W=t.onCancel,w=t.size,C=void 0===w?"sm":w,z=t.required,q=void 0!==z&&z,T=t.registrationNumberRequiredMessage,L=void 0===T?"Συμπληρώστε τον αριθμό πρωτοκόλλου":T,F=t.registrationDateRequiredMessage,P=void 0===F?"Συμπληρώστε ή επιλέξτε την ημερομηνία πρωτοκόλλου":F,j=t.okLabel,O=void 0===j?"ΚΑΤΑΧΩΡΗΣΗ":j,V=t.cancelLabel,D=void 0===V?"ΑΚΥΡΩΣΗ":V,K=t.registrationNumberMaxLength,M=void 0===K?255:K,B=t.message,N=void 0===B?null:B,H=t.isLoading,A=void 0!==H&&H,U=e.useMemo((function(){return{registration_number:p||"",registration_date:x||null}}),[p,x]),_=I.object({registration_number:q?I.string().max(M,"Παρακαλώ πληκτρολογείστε μέχρι ".concat(M," χαρακτήρες")).required(L):I.string().max(M,"Παρακαλώ πληκτρολογείστε μέχρι ".concat(M," χαρακτήρες")),registration_date:q?I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").required(P):I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").nullable()}),Y=R({defaultValues:U,resolver:k(_)});e.useEffect((function(){r&&(Y.reset(U),Y.clearErrors())}),[r,U]);return e.createElement(o,{fullWidth:!0,maxWidth:C,open:r,onClose:function(e,t){"escapeKeyDown"===t&&W()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),N&&"string"==typeof N?e.createElement(c,{variant:"caption",color:"text.secondary"},N):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:Y.handleSubmit((function(e){return y(e)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},N&&"string"!=typeof N&&e.createElement(s,{sx:{mb:2}},N),e.createElement(l,{direction:"column",spacing:2.5},e.createElement(re,{form:Y,name:"registration_number",label:b,required:q,autofocus:!0,maxLength:M,sx:{mt:1}}),e.createElement(he,{form:Y,name:"registration_date",label:E,required:q,sx:{mt:1}}))),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),W()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},D),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},A?e.createElement(v,{size:20,sx:{color:"inherit"}}):O))))},Ve=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.maxLength,L=void 0===T?255:T,R=t.message,k=void 0===R?null:R,I=t.hasDivider,F=void 0===I||I,P=ee(e.useState(!1),2),j=P[0],O=P[1],V=!o&&b,D=ee(e.useState(!1),2),K=D[0],M=D[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:V?"contained":"outlined",color:V?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),F&&e.createElement(d,{component:"li"}),e.createElement(we,{open:j,title:C,label:r,value:o,required:b,maxLength:L,onSubmit:function(e){M(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){M(!1),O(!1)}})},onCancel:function(){return O(!1)},message:k,isLoading:K}))},De=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.maxLength,L=void 0===T?255:T,R=t.message,k=void 0===R?null:R,I=t.hasDivider,F=void 0===I||I,P=ee(e.useState(!1),2),j=P[0],O=P[1],V=!o&&b,D=ee(e.useState(!1),2),K=D[0],M=D[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:V?"contained":"outlined",color:V?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),F&&e.createElement(d,{component:"li"}),e.createElement(ze,{open:j,title:C,label:r,value:o,required:b,maxLength:L,onSubmit:function(e){M(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){M(!1),O(!1)}})},onCancel:function(){return O(!1)},message:k,isLoading:K}))},Ke=function(t){var r,o=t.label,i=t.value,a=t.render,s=void 0===a?null:a,u=t.fieldName,m=void 0===u?null:u,v=t.editable,p=void 0!==v&&v,b=t.required,h=void 0===b||b,E=t.placeholder,S=void 0===E?"":E,C=t.modalTitle,z=void 0===C?"Επεξεργασία":C,q=t.updateUrl,T=void 0===q?null:q,L=t.message,R=void 0===L?null:L,k=t.hasDivider,I=void 0===k||k,j=ee(e.useState(!1),2),V=j[0],D=j[1],K=!i&&h,M=ee(e.useState(!1),2),B=M[0],N=M[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},o)),e.createElement(g,{size:{xs:12,sm:6}},h&&!i?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):s||e.createElement(c,{variant:"body1",fontWeight:500},i?(r=i)?F(P(r,{locale:O}),"dd/MM/yyyy, HH:mm"):"":S)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},p&&e.createElement(f,{size:"small",variant:K?"contained":"outlined",color:K?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),D(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i?"Επεξεργασία":"Συμπλήρωση")))),I&&e.createElement(d,{component:"li"}),e.createElement(Ie,{open:V,title:z,label:o,value:i,required:h,onSubmit:function(e){N(!0),y.put(T,{field:m,value:e},{preserveScroll:!0,onFinish:function(){N(!1),D(!1)}})},onCancel:function(){return D(!1)},message:R,isLoading:B}))},Me=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.message,L=void 0===T?null:T,R=t.hasDivider,k=void 0===R||R,I=ee(e.useState(!1),2),F=I[0],P=I[1],j=!o&&b,O=ee(e.useState(!1),2),V=O[0],D=O[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o?ce(o):E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:j?"contained":"outlined",color:j?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),P(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),k&&e.createElement(d,{component:"li"}),e.createElement(Fe,{open:F,title:C,label:r,value:o,required:b,onSubmit:function(e){D(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){D(!1),P(!1)}})},onCancel:function(){return P(!1)},message:L,isLoading:V}))},Be=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.rows,L=void 0===T?5:T,R=t.message,k=void 0===R?null:R,I=t.hasDivider,F=void 0===I||I,P=ee(e.useState(!1),2),j=P[0],O=P[1],V=!o&&b,D=ee(e.useState(!1),2),K=D[0],M=D[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500,sx:{whiteSpace:"pre-line"}},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:V?"contained":"outlined",color:V?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),F&&e.createElement(d,{component:"li"}),e.createElement(Re,{open:j,title:C,label:r,value:o,required:b,rows:L,onSubmit:function(e){M(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){M(!1),O(!1)}})},onCancel:function(){return O(!1)},message:k,isLoading:K}))},Ne=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.options,u=void 0===s?[]:s,m=t.valueKey,v=void 0===m?"id":m,p=t.labelKey,b=void 0===p?"label":p,h=t.fieldName,E=void 0===h?null:h,S=t.editable,C=void 0!==S&&S,z=t.required,q=void 0===z||z,T=t.placeholder,L=void 0===T?"":T,R=t.modalTitle,k=void 0===R?"Επεξεργασία":R,I=t.updateUrl,F=void 0===I?null:I,P=t.message,j=void 0===P?null:P,O=t.hasDivider,V=void 0===O||O,D=ee(e.useState(!1),2),K=D[0],M=D[1],B=null==o&&q,N=ee(e.useState(!1),2),H=N[0],A=N[1],U=u.find((function(e){return e[v]===o})),_=U?U[b]:"";return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},q&&null==o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},_||L)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},C&&e.createElement(f,{size:"small",variant:B?"contained":"outlined",color:B?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),M(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),V&&e.createElement(d,{component:"li"}),e.createElement(qe,{open:K,title:k,label:r,value:o,options:u,valueKey:v,labelKey:b,required:q,onSubmit:function(e){A(!0),y.put(F,{field:E,value:e.field},{preserveScroll:!0,onFinish:function(){A(!1),M(!1)}})},onCancel:function(){return M(!1)},message:j,isLoading:H}))},He=function(t){var r=t.label,n=t.value,o=t.render,i=void 0===o?null:o,a=t.fieldName,l=void 0===a?null:a,s=t.editable,u=void 0!==s&&s,m=t.activationLabel,v=void 0===m?"Ενεργοποίηση":m,p=t.deactivationLabel,b=void 0===p?"Απενεργοποίηση":p,h=t.activationMessage,E=void 0===h?"":h,S=t.deactivationMessage,W=void 0===S?"":S,w=t.updateUrl,q=void 0===w?null:w,T=t.hasDivider,L=void 0===T||T,R=ee(e.useState(!1),2),k=R[0],I=R[1],F=ee(e.useState(!1),2),P=F[0],j=F[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},i||e.createElement(c,{variant:"body1",fontWeight:500},n?1:0)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},u&&e.createElement(f,{size:"small",variant:"outlined",color:n?"error":"success",startIcon:n?e.createElement(C,{fontSize:"small"}):e.createElement(z,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),I(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},n?b:v)))),L&&e.createElement(d,{component:"li"}),e.createElement(Le,{open:k,title:n?b:v,message:n?W:E,onConfirm:function(){j(!0),y.put(q,{field:l,value:n?0:1},{preserveScroll:!0,onFinish:function(){j(!1),I(!1)}})},onCancel:function(){return I(!1)},isLoading:P}))},Ae=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.options,u=void 0===s?[]:s,m=t.valueKey,v=void 0===m?"id":m,p=t.labelKey,b=void 0===p?"label":p,h=t.fieldName,E=void 0===h?null:h,S=t.editable,C=void 0!==S&&S,z=t.required,q=void 0===z||z,T=t.placeholder,L=void 0===T?"":T,R=t.modalTitle,k=void 0===R?"Επεξεργασία":R,I=t.updateUrl,F=void 0===I?null:I,P=t.message,j=void 0===P?null:P,O=t.hasDivider,V=void 0===O||O,D=ee(e.useState(!1),2),K=D[0],M=D[1],B=q&&(!Array.isArray(o)||!o.length),N=ee(e.useState(!1),2),H=N[0],A=N[1],U=u.filter((function(e){return o.some((function(t){return t[v]===e[v]}))})).map((function(e){return e[b]})).join(", ");return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},!q||Array.isArray(o)&&o.length?a||e.createElement(c,{variant:"body1",fontWeight:500},U||L):e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}}))),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},C&&e.createElement(f,{size:"small",variant:B?"contained":"outlined",color:B?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),M(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},Array.isArray(o)&&o.length?"Επεξεργασία":"Συμπλήρωση")))),V&&e.createElement(d,{component:"li"}),e.createElement(Te,{open:K,title:k,label:r,value:o,options:u,valueKey:v,labelKey:b,required:q,onSubmit:function(e){A(!0),y.put(F,{field:E,value:e.field.map((function(e){return e[v]}))},{preserveScroll:!0,onFinish:function(){A(!1),M(!1)}})},onCancel:function(){return M(!1)},message:j,isLoading:H}))},Ue=function(t){var r=t.label,o=t.exists,i=void 0!==o&&o,a=t.fileName,s=void 0===a?null:a,u=t.placeholder,m=void 0===u?"File":u,v=t.render,p=void 0===v?null:v,h=t.editable,E=void 0!==h&&h,S=t.required,w=void 0===S||S,C=t.downloadUrl,z=void 0===C?null:C,L=t.createUrl,R=void 0===L?null:L,k=t.updateUrl,I=void 0===k?null:k,F=t.deleteUrl,P=void 0===F?null:F,j=t.hasDivider,O=void 0===j||j,V=!i&&w,D=ee(e.useState(!1),2),K=D[0],M=D[1],B=ee(e.useState(!1),2),N=B[0],H=B[1],A=e.useRef(null);return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},w&&!i?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει επιλεγεί αρχείο"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):p||e.createElement(b,{href:z,download:s,underline:"hover"},e.createElement(c,{variant:"body1",fontWeight:500},s||m))),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},E&&e.createElement(l,{direction:"row",spacing:1},i&&P&&e.createElement(f,{size:"small",variant:"outlined",color:"error",onClick:function(e){e.currentTarget.blur(),H(!0)},disabled:K,sx:{minWidth:"auto",px:1.5,borderRadius:2}},e.createElement(q,{fontSize:"small"})),e.createElement(f,{size:"small",variant:V?"contained":"outlined",color:V?"error":"primary",startIcon:e.createElement(T,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),A.current.click()},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i?"Αντικατάσταση":"Επιλογή"))))),O&&e.createElement(d,{component:"li"}),e.createElement("input",{type:"file",ref:A,onChange:function(e){var t=e.target.files[0];t&&(M(!0),y.post(i?I:R,{file:t},{forceFormData:!0,preserveScroll:!0,onFinish:function(){M(!1),e.target.value=""}}))},style:{display:"none"}}),e.createElement(Le,{open:N,title:"Επιβεβαίωση Διαγραφής",message:"Να διαγραφεί το επιλεγμένο αρχείο;",onConfirm:function(){M(!0),y.delete(P,{preserveScroll:!0,onFinish:function(){M(!1),H(!1)}})},onCancel:function(){return H(!1)}}))},_e=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.minValue,L=void 0===T?null:T,R=t.maxValue,k=void 0===R?null:R,I=t.message,F=void 0===I?null:I,P=t.hasDivider,j=void 0===P||P,O=ee(e.useState(!1),2),V=O[0],D=O[1],K=!o&&b,M=ee(e.useState(!1),2),B=M[0],N=M[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o?se(o):E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:K?"contained":"outlined",color:K?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),D(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),j&&e.createElement(d,{component:"li"}),e.createElement(ke,{open:V,title:C,label:r,value:o,required:b,minValue:L,maxValue:k,onSubmit:function(e){N(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){N(!1),D(!1)}})},onCancel:function(){return D(!1)},message:F,isLoading:B}))},Ye=function(t){var r=t.title,n=t.children,o=t.sx,i=void 0===o?{}:o,a=t.titleBgColor,l=void 0===a?"rgba(25, 118, 210, 0.08)":a,d=t.titleColor,u=void 0===d?"primary.main":d,m=t.titleFontWeight,f=void 0===m?"bold":m;return e.createElement(h,{variant:"outlined",sx:Q({mb:3,overflow:"hidden"},i)},e.createElement(s,{sx:{px:2,py:1.5,bgcolor:l}},e.createElement(c,{variant:"subtitle2",color:u,fontWeight:f},r)),e.createElement(E,{disablePadding:!0},n))},$e=function(t){var r=t.label,o=void 0===r?"Πρωτόκολλο":r,i=t.registrationNumber,a=t.registrationDate,s=t.registrationNumberLabel,u=void 0===s?"Αριθμός Πρωτοκόλλου":s,m=t.registrationDateLabel,v=void 0===m?"Ημερομηνία Πρωτοκόλλου":m,p=t.render,b=void 0===p?null:p,h=t.editable,E=void 0!==h&&h,S=t.required,C=void 0===S||S,z=t.placeholder,q=void 0===z?"----------":z,T=t.modalTitle,L=void 0===T?"Επεξεργασία Πρωτοκόλλου":T,R=t.updateUrl,k=void 0===R?null:R,I=t.registrationNumberMaxLength,F=void 0===I?255:I,P=t.message,j=void 0===P?null:P,O=t.hasDivider,V=void 0===O||O,D=ee(e.useState(!1),2),K=D[0],M=D[1],B=(!i||!a)&&C,N=ee(e.useState(!1),2),H=N[0],A=N[1],U=i&&a?"".concat(i,"/").concat(ce(a,"-")):q;return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},o)),e.createElement(g,{size:{xs:12,sm:6}},!C||i&&a?b||e.createElement(c,{variant:"body1",fontWeight:500},U):e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}}))),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},E&&e.createElement(f,{size:"small",variant:B?"contained":"outlined",color:B?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),M(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i||a?"Επεξεργασία":"Συμπλήρωση")))),V&&e.createElement(d,{component:"li"}),e.createElement(Oe,{open:K,title:L,registrationNumberLabel:u,registrationDateLabel:v,registrationNumber:i,registrationDate:a,required:C,registrationNumberMaxLength:F,registrationNumberRequiredMessage:"Συμπληρώστε τον αριθμό πρωτοκόλλου",registrationDateRequiredMessage:"Συμπληρώστε ή επιλέξτε την ημερομηνία πρωτοκόλλου",onSubmit:function(e){A(!0),y.put(k,e,{preserveScroll:!0,onFinish:function(){A(!1),M(!1)}})},onCancel:function(){return M(!1)},message:j,isLoading:H}))},Ze=function(t){var r,o=t.label,i=t.value,a=t.render,s=void 0===a?null:a,u=t.fieldName,m=void 0===u?null:u,v=t.editable,p=void 0!==v&&v,b=t.required,h=void 0===b||b,E=t.placeholder,S=void 0===E?"":E,C=t.modalTitle,z=void 0===C?"Επεξεργασία":C,q=t.updateUrl,T=void 0===q?null:q,L=t.message,R=void 0===L?null:L,k=t.hasDivider,I=void 0===k||k,j=ee(e.useState(!1),2),V=j[0],D=j[1],K=!i&&h,M=ee(e.useState(!1),2),B=M[0],N=M[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},o)),e.createElement(g,{size:{xs:12,sm:6}},h&&!i?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):s||e.createElement(c,{variant:"body1",fontWeight:500},i?(r=i)?F(P(r,{locale:O}),"HH:mm"):"":S)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},p&&e.createElement(f,{size:"small",variant:K?"contained":"outlined",color:K?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),D(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i?"Επεξεργασία":"Συμπλήρωση")))),I&&e.createElement(d,{component:"li"}),e.createElement(je,{open:V,title:z,label:o,value:i,required:h,onSubmit:function(e){N(!0),y.put(T,{field:m,value:e},{preserveScroll:!0,onFinish:function(){N(!1),D(!1)}})},onCancel:function(){return D(!1)},message:R,isLoading:B}))},Ge=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.minValue,L=void 0===T?null:T,R=t.maxValue,k=void 0===R?null:R,I=t.message,F=void 0===I?null:I,P=t.hasDivider,j=void 0===P||P,O=ee(e.useState(!1),2),V=O[0],D=O[1],K=!o&&b,M=ee(e.useState(!1),2),B=M[0],N=M[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:K?"contained":"outlined",color:K?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),D(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),j&&e.createElement(d,{component:"li"}),e.createElement(Pe,{open:V,title:C,label:r,value:o,required:b,minValue:L,maxValue:k,onSubmit:function(e){N(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){N(!1),D(!1)}})},onCancel:function(){return D(!1)},message:F,isLoading:B}))};export{Ae as AutocompleteMultiProperty,Ne as AutocompleteProperty,_e as CurrencyProperty,Me as DateProperty,Ke as DateTimeProperty,De as EmailProperty,Ue as FileProperty,Ge as IntegerProperty,Ye as PropertyGroup,$e as RegistrationProperty,Ve as StringProperty,Be as TextProperty,Ze as TimeProperty,He as ToggleProperty};
|
|
1
|
+
import e from"react";import{TextField as t,Autocomplete as r,Chip as n,Dialog as o,Zoom as i,DialogTitle as a,Stack as l,Box as s,Typography as c,Divider as d,DialogContent as u,DialogActions as m,Button as f,CircularProgress as v,DialogContentText as p,ListItem as x,Grid2 as g,Link as b,Paper as h,List as E}from"@mui/material";import{router as y}from"@inertiajs/react";import{EditNoteRounded as S,ErrorOutline as W,Edit as w,ToggleOff as C,ToggleOn as z,DeleteOutline as q,Upload as T}from"@mui/icons-material";import{Controller as L,useForm as R}from"react-hook-form";import{yupResolver as k}from"@hookform/resolvers/yup";import*as I from"yup";import"react-color";import{format as F,parseISO as P,toDate as j}from"date-fns";import{el as V}from"date-fns/locale";import"axios";import{NumericFormat as D}from"react-number-format";import{AdapterDateFns as O}from"@mui/x-date-pickers/AdapterDateFnsV3";import{LocalizationProvider as M}from"@mui/x-date-pickers/LocalizationProvider";import{DateTimePicker as K,renderDigitalClockTimeView as N,DatePicker as B,TimePicker as H}from"@mui/x-date-pickers";import A from"date-fns/locale/el";import U from"@mui/icons-material/WarningAmberRounded";import _ from"@mui/icons-material/ErrorOutlineRounded";import Y from"@mui/icons-material/CheckCircleOutlineRounded";function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function G(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(null,arguments)}function J(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 Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function X(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ee(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){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(e,t):void 0}}(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.")}()}var te=["form","name","label","maxLength","required","disabled","autofocus","showErrors","readonly","readonlyBackgroundColor","bold"],re=function(r){var n=r.form,o=r.name,i=r.label,a=r.maxLength,l=void 0===a?255:a,s=r.required,c=void 0!==s&&s,d=r.disabled,u=void 0!==d&&d,m=r.autofocus,f=void 0!==m&&m,v=r.showErrors,p=void 0===v||v,x=r.readonly,g=void 0!==x&&x,b=r.readonlyBackgroundColor,h=void 0===b?"#dddddd":b,E=r.bold,y=void 0!==E&&E,S=X(r,te),W=n.control,w=n.formState.errors;return e.createElement(L,{name:o,control:W,rules:{required:c,disabled:u},render:function(r){var n,a,s=r.field,d=s.onChange,m=s.onBlur,v=s.value;return e.createElement(t,Z({required:c,label:i,value:v,onChange:d,onBlur:m,error:p&&Boolean(null===(n=w[o])||void 0===n?void 0:n.message),fullWidth:!0,helperText:p&&(null===(a=w[o])||void 0===a?void 0:a.message),variant:"outlined",disabled:u,autoFocus:f,slotProps:{input:{maxLength:l,readOnly:g,sx:{fontWeight:y?"bold":"",backgroundColor:g?h:""}}}},S))}})},ne=["form","name","label","maxLength","required","disabled","autofocus","showErrors","readonly","readonlyBackgroundColor","bold"],oe=function(r){var n=r.form,o=r.name,i=void 0===o?"email":o,a=r.label,l=void 0===a?"E-mail":a,s=r.maxLength,c=void 0===s?255:s,d=r.required,u=void 0===d||d,m=r.disabled,f=void 0!==m&&m,v=r.autofocus,p=void 0!==v&&v,x=r.showErrors,g=void 0===x||x,b=r.readonly,h=void 0!==b&&b,E=r.readonlyBackgroundColor,y=void 0===E?"#dddddd":E,S=r.bold,W=void 0!==S&&S,w=X(r,ne),C=n.control,z=n.formState.errors;return e.createElement(L,{name:i,control:C,rules:{required:u,disabled:f},render:function(r){var n,o,a=r.field,s=a.onChange,d=a.onBlur,m=a.value;return e.createElement(t,Z({required:u,label:l,value:m,onChange:s,onBlur:d,error:g&&Boolean(null===(n=z[i])||void 0===n?void 0:n.message),fullWidth:!0,helperText:g&&(null===(o=z[i])||void 0===o?void 0:o.message),variant:"outlined",disabled:f,autoFocus:p,slotProps:{input:{maxLength:c,readOnly:h,sx:{fontWeight:W?"bold":"",backgroundColor:h?y:""}}}},w))}})},ie=["form","name","label","required","disabled","options","valueKey","labelKey","maxLength","autofocus","noOptionsText","showErrors","size","readonly","readonlyBackgroundColor","bold"],ae=function(n){var o=n.form,i=n.name,a=n.label,l=n.required,s=void 0!==l&&l,c=n.disabled,d=void 0!==c&&c,u=n.options,m=void 0===u?[]:u,f=n.valueKey,v=void 0===f?"id":f,p=n.labelKey,x=void 0===p?"label":p,g=n.maxLength,b=void 0===g?255:g,h=n.autofocus,E=void 0!==h&&h,y=n.noOptionsText,S=void 0===y?"Δεν υπάρχουν επιλογές":y,W=n.showErrors,w=void 0===W||W,C=n.size,z=void 0===C?"medium":C,q=n.readonly,T=void 0!==q&&q,R=n.readonlyBackgroundColor,k=void 0===R?"#dddddd":R,I=n.bold,F=void 0!==I&&I,P=X(n,ie),j=ee(e.useState(null),2),V=j[0],D=j[1],O=o.watch(i);e.useEffect((function(){D(m.find((function(e){return e[v]===O}))||null)}),[O]);var M=o.control,K=o.formState.errors;return e.createElement(L,{name:i,control:M,rules:{required:s,disabled:d},render:function(n){var o=n.field,l=o.onChange,c=o.onBlur;return o.value,T?e.createElement(t,{size:z,label:a,fullWidth:!0,required:s,slotProps:{input:{maxLength:b,readOnly:T,sx:{fontWeight:F?"bold":"",backgroundColor:T?k:""}}},value:V?V.label:""}):e.createElement(r,{value:V,required:s,onChange:function(e,t){return l(t?t[v]:null)},options:m,isOptionEqualToValue:function(e,t){return e[v]===t[v]},noOptionsText:S,getOptionLabel:function(e){return e[x]},size:z,slotProps:{input:{maxLength:b,sx:{fontWeight:F?"bold":"",color:"red"}}},renderInput:function(r){var n,o;return e.createElement(t,Z({label:a,required:s,disabled:d,autoFocus:E,size:z,error:w&&Boolean(null===(n=K[i])||void 0===n?void 0:n.message),onBlur:c,variant:"outlined",fullWidth:!0,helperText:w&&(null===(o=K[i])||void 0===o?void 0:o.message)},r,P))}})}})},le=function(e){return null==e||""===e},se=function(e){return null!=e&&""!==e},ce=function(e){return le(e)?"":new Intl.NumberFormat("el-GR",{style:"currency",currency:"EUR"}).format(e)},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return e?F(P(e,{locale:V}),"dd".concat(t,"MM").concat(t,"yyyy")):""},ue=["form","name","label","required","disabled","options","valueKey","labelKey","maxLength","autofocus","noOptionsText","showErrors"],me=function(o){var i=o.form,a=o.name,l=o.label,s=o.required,c=void 0!==s&&s,d=o.disabled,u=void 0!==d&&d,m=o.options,f=void 0===m?[]:m,v=o.valueKey,p=void 0===v?"id":v,x=o.labelKey,g=void 0===x?"label":x,b=o.maxLength,h=void 0===b?255:b,E=o.autofocus,y=void 0!==E&&E,S=o.noOptionsText,W=void 0===S?"Δεν υπάρχουν επιλογές":S,w=o.showErrors,C=void 0===w||w,z=X(o,ue),q=ee(e.useState([]),2),T=q[0],R=q[1],k=i.watch(a);e.useEffect((function(){R(f.filter((function(e){return function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return Boolean(t.find((function(t){return t[r]===e[r]})))}(e,k)})))}),[k]);var I=i.control,F=i.formState.errors;return e.createElement(L,{name:a,control:I,rules:{required:c,disabled:u},render:function(o){var i=o.field,s=i.onChange,d=i.onBlur;return i.value,e.createElement(r,{multiple:!0,value:T,required:c,onChange:function(e,t){return s(t)},options:f,isOptionEqualToValue:function(e,t){return e[p]===t[p]},noOptionsText:W,renderTags:function(t,r){return t.map((function(t,o){return e.createElement(n,Z({variant:"outlined",label:t[g],size:"small"},r({index:o})))}))},renderInput:function(r){var n,o;return e.createElement(t,Z({label:l,required:c,disabled:u,autoFocus:y,inputProps:{maxLength:h},error:C&&Boolean(null===(n=F[a])||void 0===n?void 0:n.message),onBlur:d,variant:"outlined",fullWidth:!0,helperText:C&&(null===(o=F[a])||void 0===o?void 0:o.message)},r,z))}})}})},fe=["form","name","label","rows","required","disabled","autofocus","showErrors"],ve=function(r){var n=r.form,o=r.name,i=r.label,a=r.rows,l=void 0===a?5:a,s=r.required,c=void 0!==s&&s,d=r.disabled,u=void 0!==d&&d,m=r.autofocus,f=void 0!==m&&m,v=r.showErrors,p=void 0===v||v,x=X(r,fe),g=n.control,b=n.formState.errors;return e.createElement(L,{name:o,control:g,rules:{required:c,disabled:u},render:function(r){var n,a,s=r.field,d=s.onChange,m=s.onBlur,v=s.value;return e.createElement(t,Z({required:c,label:i,value:v,multiline:!0,minRows:l,maxRows:l,onChange:d,onBlur:m,error:p&&Boolean(null===(n=b[o])||void 0===n?void 0:n.message),fullWidth:!0,helperText:p&&(null===(a=b[o])||void 0===a?void 0:a.message),variant:"outlined",disabled:u,autoFocus:f},x))}})},pe=["form","name","label","required","disabled","autofocus","showErrors","readonly","readonlyBackgroundColor","bold"],xe=function(r){var n=r.form,o=r.name,i=r.label,a=r.required,l=void 0!==a&&a,s=r.disabled,c=void 0!==s&&s;r.autofocus;var d=r.showErrors,u=void 0===d||d,m=r.readonly,f=void 0!==m&&m,v=r.readonlyBackgroundColor,p=void 0===v?"#dddddd":v,x=r.bold,g=void 0!==x&&x,b=X(r,pe),h=n.control,E=n.formState.errors,y=function(e,t){""===e.value?n.setValue(o,null):n.setValue(o,e.floatValue)};return e.createElement(L,{name:o,control:h,rules:{required:l,disabled:c},render:function(r){var n,a,s=r.field;s.onChange,s.onBlur;var d=s.value;return e.createElement(D,Z({customInput:t,variant:"outlined",label:i,required:l,disabled:c,value:d,thousandSeparator:".",decimalSeparator:",",decimalScale:2,fixedDecimalScale:!0,allowNegative:!1,onValueChange:y,error:u&&Boolean(null===(n=E[o])||void 0===n?void 0:n.message),helperText:u&&(null===(a=E[o])||void 0===a?void 0:a.message),fullWidth:!0,slotProps:{input:{readOnly:f,sx:{fontWeight:g?"bold":"",backgroundColor:f?p:""}}}},b))}})},ge=["form","name","label","required","disabled","autofocus","showErrors","ampm","singleTimeColumn","hoursStep","minutesStep","secondsStep"],be=function(t){var r=t.form,n=t.name,o=t.label,i=t.required,a=void 0!==i&&i,l=t.disabled,s=void 0!==l&&l;t.autofocus;var c=t.showErrors,d=void 0===c||c,u=t.ampm,m=void 0!==u&&u,f=t.singleTimeColumn,v=void 0===f||f,p=t.hoursStep,x=void 0===p?1:p,g=t.minutesStep,b=void 0===g?15:g,h=t.secondsStep,E=void 0===h?30:h,y=X(t,ge),S=r.control,W=r.formState.errors;return e.createElement(M,{dateAdapter:O,adapterLocale:A,localeText:{fieldDayPlaceholder:function(e){return"ΗΗ"},fieldMonthPlaceholder:function(e){return"ΜΜ"},fieldYearPlaceholder:function(e){return"EEEE"},fieldHoursPlaceholder:function(e){return"ΩΩ"},fieldMinutesPlaceholder:function(e){return"ΛΛ"},fieldClearLabel:"Καθαρισμός"}},e.createElement(L,{name:n,control:S,rules:{required:a,disabled:s},render:function(t){var r,i,l=t.field;return e.createElement(K,{label:o,value:l.value?j(l.value):null,format:"dd/MM/yyyy HH:mm",inputFormat:!0,views:v?["year","month","day","hours"]:["year","month","day","hours","minutes"],ampm:m,onChange:function(e){return l.onChange(e)},viewRenderers:v?{hours:N}:null,timeSteps:{hours:x,minutes:b,seconds:E},slotProps:{field:{clearable:!0,onClear:function(){return l.onChange(null)}},textField:Q(Q({},y),{},{required:a,error:d&&Boolean(null===(r=W[n])||void 0===r?void 0:r.message),helperText:d&&(null===(i=W[n])||void 0===i?void 0:i.message),variant:"outlined",fullWidth:!0})}})}}))},he=["form","name","label","required","disabled","autofocus","showErrors"],Ee=function(t){var r=t.form,n=t.name,o=t.label,i=t.required,a=void 0!==i&&i,l=t.disabled,s=void 0!==l&&l;t.autofocus;var c=t.showErrors,d=void 0===c||c,u=X(t,he),m=r.control,f=r.formState.errors;return e.createElement(M,{dateAdapter:O,adapterLocale:A,localeText:{fieldDayPlaceholder:function(e){return"ΗΗ"},fieldMonthPlaceholder:function(e){return"ΜΜ"},fieldYearPlaceholder:function(e){return"EEEE"},fieldClearLabel:"Καθαρισμός"}},e.createElement(L,{name:n,control:m,rules:{required:a,disabled:s},render:function(t){var r,i,l=t.field;return e.createElement(B,{label:o,value:l.value?j(l.value):null,format:"dd/MM/yyyy",inputFormat:!0,onChange:function(e){return l.onChange(e)},slotProps:{field:{clearable:!0,onClear:function(){return l.onChange(null)}},textField:Q(Q({},u),{},{required:a,error:d&&Boolean(null===(r=f[n])||void 0===r?void 0:r.message),helperText:d&&(null===(i=f[n])||void 0===i?void 0:i.message),variant:"outlined",fullWidth:!0})}})}}))},ye=["form","name","label","allowNegative","required","disabled","autofocus","showErrors"],Se=function(r){var n=r.form,o=r.name,i=r.label,a=r.allowNegative,l=void 0!==a&&a,s=r.required,c=void 0!==s&&s,d=r.disabled,u=void 0!==d&&d,m=r.autofocus,f=void 0!==m&&m,v=r.showErrors,p=void 0===v||v,x=X(r,ye),g=n.control,b=n.formState.errors,h=function(e,t){""===e.value?n.setValue(o,null):n.setValue(o,e.floatValue)};return e.createElement(L,{name:o,control:g,rules:{required:c,disabled:u},render:function(r){var n,a,s=r.field;s.onChange,s.onBlur;var d=s.value;return e.createElement(D,Z({customInput:t,variant:"outlined",label:i,required:c,disabled:u,value:d,thousandSeparator:!1,decimalSeparator:",",decimalScale:0,fixedDecimalScale:!0,allowNegative:l,onValueChange:h,error:p&&Boolean(null===(n=b[o])||void 0===n?void 0:n.message),helperText:p&&(null===(a=b[o])||void 0===a?void 0:a.message),fullWidth:!0,autoFocus:f},x))}})},We=["form","name","label","ampm","hoursStep","minutesStep","secondsStep","singleTimeColumn","required","disabled","autofocus","showErrors"],we=function(t){var r=t.form,n=t.name,o=t.label,i=t.ampm,a=void 0!==i&&i,l=t.hoursStep,s=void 0===l?1:l,c=t.minutesStep,d=void 0===c?15:c,u=t.secondsStep,m=void 0===u?30:u,f=t.singleTimeColumn,v=void 0===f||f,p=t.required,x=void 0!==p&&p,g=t.disabled,b=void 0!==g&&g;t.autofocus;var h=t.showErrors,E=void 0===h||h,y=X(t,We),S=r.control,W=r.formState.errors;return e.createElement(M,{dateAdapter:O,adapterLocale:A,localeText:{fieldDayPlaceholder:function(e){return"ΗΗ"},fieldMonthPlaceholder:function(e){return"ΜΜ"},fieldYearPlaceholder:function(e){return"EEEE"},fieldHoursPlaceholder:function(e){return"ΩΩ"},fieldMinutesPlaceholder:function(e){return"ΛΛ"}}},e.createElement(L,{name:n,control:S,rules:{required:x,disabled:b},render:function(t){var r,i,l=t.field;return e.createElement(H,{label:o,value:l.value?j(l.value):null,format:"HH:mm",inputFormat:!0,views:v?["hours"]:["hours","minutes"],ampm:a,onChange:function(e){return l.onChange(e)},viewRenderers:v?{hours:N}:null,timeSteps:{hours:s,minutes:d,seconds:m},slotProps:{textField:Q(Q({},y),{},{required:x,error:E&&Boolean(null===(r=W[n])||void 0===r?void 0:r.message),helperText:E&&(null===(i=W[n])||void 0===i?void 0:i.message),variant:"outlined",fullWidth:!0})}})}}))},Ce=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.maxLength,P=void 0===F?255:F,j=t.message,V=void 0===j?null:j,D=t.isLoading,O=void 0!==D&&D,M={text:x||""},K=I.object({text:W?I.string().max(P,"Παρακαλώ πληκτρολογείστε μέχρι ".concat(P," χαρακτήρες")).required(C):I.string().max(P)}),N=R({defaultValues:M,resolver:k(K)});e.useEffect((function(){r&&(N.reset(M),N.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),V&&"string"==typeof V?e.createElement(c,{variant:"caption",color:"text.secondary"},V):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:N.handleSubmit((function(e){return g(e.text)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},V&&"string"!=typeof V&&e.createElement(s,{sx:{mb:2}},V),e.createElement(re,{form:N,name:"text",label:p,required:W,autofocus:!0,maxLength:P,sx:{mt:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},O?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},ze=/^$|^(([^<>()\[\]\\.,;:\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,}))$/,qe=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.invalidMessage,q=void 0===z?"Μη έγκυρη μορφή email":z,T=t.okLabel,L=void 0===T?"ΚΑΤΑΧΩΡΗΣΗ":T,F=t.cancelLabel,P=void 0===F?"ΑΚΥΡΩΣΗ":F,j=t.maxLength,V=void 0===j?255:j,D=t.message,O=void 0===D?null:D,M=t.isLoading,K=void 0!==M&&M,N={email:x||""},B=I.object({email:W?I.string().matches(ze,q).required(C):I.string().matches(ze,q)}),H=R({defaultValues:N,resolver:k(B)});e.useEffect((function(){r&&(H.reset(N),H.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),O&&"string"==typeof O?e.createElement(c,{variant:"caption",color:"text.secondary"},O):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:H.handleSubmit((function(e){return g(e.email)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},O&&"string"!=typeof O&&e.createElement(s,{sx:{mb:2}},O),e.createElement(oe,{form:H,label:p,required:W,autofocus:!0,maxLength:V,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},P),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},K?e.createElement(v,{size:20,sx:{color:"inherit"}}):L))))};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".chrome-picker {\r\n -webkit-box-shadow: none !important;\r\n -moz-box-shadow: none !important;\r\n box-shadow: none !important;\r\n}");var Te=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.options,E=void 0===h?[]:h,y=t.valueKey,W=void 0===y?"id":y,w=t.labelKey,C=void 0===w?"label":w,z=t.required,q=void 0===z||z,T=t.size,L=void 0===T?"sm":T,F=t.requiredMessage,P=void 0===F?"Υποχρεωτικό πεδίο":F,j=t.okLabel,V=void 0===j?"ΚΑΤΑΧΩΡΗΣΗ":j,D=t.cancelLabel,O=void 0===D?"ΑΚΥΡΩΣΗ":D,M=t.message,K=void 0===M?null:M,N=t.isLoading,B=void 0!==N&&N,H={field:x||null},A=I.object({field:q?I.string().required(P):I.string().nullable()}),U=R({defaultValues:H,resolver:k(A)});e.useEffect((function(){r&&(U.reset(H),U.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:L,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),K&&"string"==typeof K?e.createElement(c,{variant:"caption",color:"text.secondary"},K):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:U.handleSubmit((function(e){return g(e)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},K&&"string"!=typeof K&&e.createElement(s,{sx:{mb:2}},K),e.createElement(ae,{form:U,name:"field",label:p,options:E,valueKey:W,labelKey:C,required:q,autofocus:!0,size:"medium",sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},O),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},B?e.createElement(v,{size:20,sx:{color:"inherit"}}):V))))},Le=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=void 0===x?[]:x,b=t.onSubmit,h=t.onCancel,E=t.options,y=void 0===E?[]:E,W=t.valueKey,w=void 0===W?"id":W,C=t.labelKey,z=void 0===C?"label":C,q=t.required,T=void 0===q||q,L=t.size,F=void 0===L?"sm":L,P=t.requiredMessage,j=void 0===P?"Επιλέξτε τουλάχιστον μία τιμή":P,V=t.okLabel,D=void 0===V?"ΚΑΤΑΧΩΡΗΣΗ":V,O=t.cancelLabel,M=void 0===O?"ΑΚΥΡΩΣΗ":O,K=t.message,N=void 0===K?null:K,B=t.isLoading,H=void 0!==B&&B,A={field:g||[]},U=I.object({field:T?I.array().min(1,j):I.array()}),_=R({defaultValues:A,resolver:k(U)});e.useEffect((function(){r&&(_.reset(A),_.clearErrors())}),[r,g]);return e.createElement(o,{fullWidth:!0,maxWidth:F,open:r,onClose:function(e,t){"escapeKeyDown"===t&&h()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),N&&"string"==typeof N?e.createElement(c,{variant:"caption",color:"text.secondary"},N):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:_.handleSubmit((function(e){return b(e)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},N&&"string"!=typeof N&&e.createElement(s,{sx:{mb:2}},N),e.createElement(me,{form:_,name:"field",label:p,options:y,valueKey:w,labelKey:z,required:T,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),h()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},M),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},H?e.createElement(v,{size:20,sx:{color:"inherit"}}):D))))},Re=function(t){var r=t.open,n=t.title,l=t.message,c=t.onConfirm,d=t.onCancel,x=t.confirmText,g=void 0===x?"ΕΠΙΒΕΒΑΙΩΣΗ":x,b=t.cancelText,h=void 0===b?"ΑΚΥΡΩΣΗ":b,E=t.isLoading,y=void 0!==E&&E,S=t.type,W=void 0===S?"warning":S,w={warning:{color:"warning.main",icon:e.createElement(U,{sx:{fontSize:40}})},error:{color:"error.main",icon:e.createElement(_,{sx:{fontSize:40}})},success:{color:"success.main",icon:e.createElement(Y,{sx:{fontSize:40}})}}[W]||{color:"primary.main",icon:null};return e.createElement(o,{open:r,onClose:function(e,t){"backdropClick"!==t&&d()},slots:{transition:i},slotProps:{backdrop:{sx:{backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(4px)"}},paper:{sx:{borderRadius:4,padding:1,maxWidth:400,textAlign:"center",backgroundImage:"none"}}}},e.createElement(s,{sx:{display:"flex",flexDirection:"column",alignItems:"center",mt:3}},e.createElement(s,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:70,height:70,bgcolor:"".concat(w.color,"20"),color:w.color,borderRadius:"50%",mb:2}},w.icon),e.createElement(a,{sx:{fontWeight:800,fontSize:"1.35rem",pt:0,pb:1}},n)),e.createElement(u,null,e.createElement(p,{sx:{color:"text.secondary",fontWeight:500,lineHeight:1.6}},l)),e.createElement(m,{sx:{justifyContent:"center",gap:2,px:3,pb:3,mt:1}},e.createElement(f,{fullWidth:!0,variant:"text",color:"inherit",onClick:d,sx:{borderRadius:3,fontWeight:700,color:"text.disabled"}},h),e.createElement(f,{fullWidth:!0,variant:"contained",disableElevation:!0,color:"error"===W?"error":"primary",onClick:c,sx:{borderRadius:3,fontWeight:700,py:1}},y?e.createElement(v,{size:20,sx:{color:"inherit"}}):g)))},ke=function(t){var r=t.open,n=t.title,p=t.label,x=t.message,g=void 0===x?null:x,b=t.value,h=t.onSubmit,E=t.onCancel,y=t.size,W=void 0===y?"sm":y,w=t.rows,C=void 0===w?5:w,z=t.required,q=void 0!==z&&z,T=t.requiredMessage,L=void 0===T?"Υποχρεωτικό πεδίο":T,F=t.okLabel,P=void 0===F?"ΚΑΤΑΧΩΡΗΣΗ":F,j=t.cancelLabel,V=void 0===j?"ΑΚΥΡΩΣΗ":j,D=t.isLoading,O=void 0!==D&&D,M={notes:b||""},K=I.object({notes:q?I.string().required(L):I.string()}),N=R({defaultValues:M,resolver:k(K)});e.useEffect((function(){r&&(N.reset(M),N.clearErrors())}),[r,b]);return e.createElement(o,{fullWidth:!0,maxWidth:W,open:r,onClose:function(e,t){"escapeKeyDown"===t&&E()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),g&&"string"==typeof g?e.createElement(c,{variant:"caption",color:"text.secondary"},g):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:N.handleSubmit((function(e){return h(e.notes)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},g&&"string"!=typeof g&&e.createElement(s,{sx:{mb:2}},g),e.createElement(ve,{form:N,name:"notes",label:p,required:q,rows:C,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),E()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},V),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},O?e.createElement(v,{size:20,sx:{color:"inherit"}}):P))))},Ie=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.minValue,C=void 0===w?null:w,z=t.maxValue,q=void 0===z?null:z,T=t.requiredMessage,L=void 0===T?"Υποχρεωτικό πεδίο":T,F=t.okLabel,P=void 0===F?"ΚΑΤΑΧΩΡΗΣΗ":F,j=t.cancelLabel,V=void 0===j?"ΑΚΥΡΩΣΗ":j,D=t.message,O=void 0===D?null:D,M=t.isLoading,K=void 0!==M&&M,N={poso:se(x)?x:null},B=I.object({poso:I.number().when([],{is:function(e){return W},then:function(e){return e.required(L)},otherwise:function(e){return e.nullable(!0)}}).when([],{is:function(e){return null!==C},then:function(e){return e.min(C,"Το ποσό πρέπει να είναι μεγαλύτερο ή ίσο από ".concat(ce(C)))},otherwise:function(e){return e}}).when([],{is:function(e){return null!==q},then:function(e){return e.max(q,"Το ποσό πρέπει να είναι μικρότερο ή ίσο από ".concat(ce(q)))},otherwise:function(e){return e}})}),H=R({defaultValues:N,resolver:k(B)});e.useEffect((function(){r&&(H.reset(N),H.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),O&&"string"==typeof O?e.createElement(c,{variant:"caption",color:"text.secondary"},O):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:H.handleSubmit((function(e){return g(e.poso)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},e.createElement(xe,{form:H,name:"poso",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},V),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},K?e.createElement(v,{size:20,sx:{color:"inherit"}}):P))))},Fe=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.message,P=void 0===F?null:F,j=t.isLoading,V=void 0!==j&&j,D={datetime:x},O=I.object({datetime:W?I.date().typeError("Μη έγκυρη μορφή ημερομηνίας/ώρας").required(C):I.date().typeError("Μη έγκυρη μορφή ημερομηνίας/ώρας").nullable()}),M=R({defaultValues:D,resolver:k(O)});e.useEffect((function(){r&&(M.reset(D),M.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),P&&"string"==typeof P?e.createElement(c,{variant:"caption",color:"text.secondary"},P):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:M.handleSubmit((function(e){return g(e.datetime)})),noValidate:!0},e.createElement(u,null,P&&"string"!=typeof P&&e.createElement(s,{sx:{mb:2}},P),e.createElement(be,{form:M,name:"datetime",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},V?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},Pe=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.message,P=void 0===F?null:F,j=t.isLoading,V=void 0!==j&&j,D={datetime:x},O=I.object({datetime:W?I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").required(C):I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").nullable()}),M=R({defaultValues:D,resolver:k(O)});e.useEffect((function(){r&&(M.reset(D),M.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),P&&"string"==typeof P?e.createElement(c,{variant:"caption",color:"text.secondary"},P):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:M.handleSubmit((function(e){return g(e.datetime)})),noValidate:!0},e.createElement(u,null,P&&"string"!=typeof P&&e.createElement(s,{sx:{mb:2}},P),e.createElement(Ee,{form:M,name:"datetime",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},V?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},je=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.allowNegative,E=void 0!==h&&h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.size,q=void 0===z?"sm":z,T=t.minValue,L=void 0===T?null:T,F=t.maxValue,P=void 0===F?null:F,j=t.okLabel,V=void 0===j?"ΚΑΤΑΧΩΡΗΣΗ":j,D=t.cancelLabel,O=void 0===D?"ΑΚΥΡΩΣΗ":D,M=t.message,K=void 0===M?null:M,N=t.isLoading,B=void 0!==N&&N,H={num:se(x)?x:null},A=I.object({num:I.number().when([],{is:function(e){return W},then:function(e){return e.required(C)},otherwise:function(e){return e.nullable(!0)}}).when([],{is:function(e){return null!==L},then:function(e){return e.min(L,"Η τιμή πρέπει να είναι μεγαλύτερη ή ίση από ".concat(L))},otherwise:function(e){return e}}).when([],{is:function(e){return null!==P},then:function(e){return e.max(P,"Η τιμή πρέπει να είναι μικρότερη ή ίση από ".concat(P))},otherwise:function(e){return e}})}),U=R({defaultValues:H,resolver:k(A)});e.useEffect((function(){r&&(U.reset(H),U.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:q,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),K&&"string"==typeof K?e.createElement(c,{variant:"caption",color:"text.secondary"},K):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:U.handleSubmit((function(e){return g(e.num)})),noValidate:!0},e.createElement(u,null,e.createElement(Se,{form:U,name:"num",label:p,required:W,autofocus:!0,allowNegative:E,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},O),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},B?e.createElement(v,{size:20,sx:{color:"inherit"}}):V))))},Ve=function(t){var r=t.open,n=t.title,p=t.label,x=t.value,g=t.onSubmit,b=t.onCancel,h=t.size,E=void 0===h?"sm":h,y=t.required,W=void 0===y||y,w=t.requiredMessage,C=void 0===w?"Υποχρεωτικό πεδίο":w,z=t.okLabel,q=void 0===z?"ΚΑΤΑΧΩΡΗΣΗ":z,T=t.cancelLabel,L=void 0===T?"ΑΚΥΡΩΣΗ":T,F=t.message,P=void 0===F?null:F,j=t.isLoading,V=void 0!==j&&j,D={datetime:x},O=I.object({datetime:W?I.date().typeError("Μη έγκυρη μορφή ώρας").required(C):I.date().typeError("Μη έγκυρη μορφή ώρας")}),M=R({defaultValues:D,resolver:k(O)});e.useEffect((function(){r&&(M.reset(D),M.clearErrors())}),[r,x]);return e.createElement(o,{fullWidth:!0,maxWidth:E,open:r,onClose:function(e,t){"escapeKeyDown"===t&&b()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),P&&"string"==typeof P?e.createElement(c,{variant:"caption",color:"text.secondary"},P):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:M.handleSubmit((function(e){return g(e.datetime)})),noValidate:!0},e.createElement(u,null,P&&"string"!=typeof P&&e.createElement(s,{sx:{mb:2}},P),e.createElement(we,{form:M,name:"datetime",label:p,required:W,autofocus:!0,sx:{marginTop:1}})),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),b()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},L),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},V?e.createElement(v,{size:20,sx:{color:"inherit"}}):q))))},De=function(t){var r=t.open,n=t.title,p=t.registrationNumber,x=t.registrationDate,g=t.registrationNumberLabel,b=void 0===g?"Αριθμός Πρωτοκόλλου":g,h=t.registrationDateLabel,E=void 0===h?"Ημερομηνία Πρωτοκόλλου":h,y=t.onSubmit,W=t.onCancel,w=t.size,C=void 0===w?"sm":w,z=t.required,q=void 0!==z&&z,T=t.registrationNumberRequiredMessage,L=void 0===T?"Συμπληρώστε τον αριθμό πρωτοκόλλου":T,F=t.registrationDateRequiredMessage,P=void 0===F?"Συμπληρώστε ή επιλέξτε την ημερομηνία πρωτοκόλλου":F,j=t.okLabel,V=void 0===j?"ΚΑΤΑΧΩΡΗΣΗ":j,D=t.cancelLabel,O=void 0===D?"ΑΚΥΡΩΣΗ":D,M=t.registrationNumberMaxLength,K=void 0===M?255:M,N=t.message,B=void 0===N?null:N,H=t.isLoading,A=void 0!==H&&H,U=e.useMemo((function(){return{registration_number:p||"",registration_date:x||null}}),[p,x]),_=I.object({registration_number:q?I.string().max(K,"Παρακαλώ πληκτρολογείστε μέχρι ".concat(K," χαρακτήρες")).required(L):I.string().max(K,"Παρακαλώ πληκτρολογείστε μέχρι ".concat(K," χαρακτήρες")),registration_date:q?I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").required(P):I.date().typeError("Μη έγκυρη μορφή ημερομηνίας").nullable()}),Y=R({defaultValues:U,resolver:k(_)});e.useEffect((function(){r&&(Y.reset(U),Y.clearErrors())}),[r,U]);return e.createElement(o,{fullWidth:!0,maxWidth:C,open:r,onClose:function(e,t){"escapeKeyDown"===t&&W()},slots:{transition:i},disableRestoreFocus:!1,slotProps:{paper:{sx:{borderRadius:3,p:.5}}}},e.createElement(a,{sx:{pb:1.5}},e.createElement(l,{direction:"row",spacing:2,alignItems:"center"},e.createElement(s,{sx:{bgcolor:"primary.light",color:"primary.main",p:1,borderRadius:2,display:"flex"}},e.createElement(S,null)),e.createElement(s,null,e.createElement(c,{variant:"h6",fontWeight:700,lineHeight:1.2},n),B&&"string"==typeof B?e.createElement(c,{variant:"caption",color:"text.secondary"},B):null))),e.createElement(d,{sx:{mx:3,opacity:.5}}),e.createElement("form",{onSubmit:Y.handleSubmit((function(e){return y(e)})),noValidate:!0},e.createElement(u,{sx:{mt:1}},B&&"string"!=typeof B&&e.createElement(s,{sx:{mb:2}},B),e.createElement(l,{direction:"column",spacing:2.5},e.createElement(re,{form:Y,name:"registration_number",label:b,required:q,autofocus:!0,maxLength:K,sx:{mt:1}}),e.createElement(Ee,{form:Y,name:"registration_date",label:E,required:q,sx:{mt:1}}))),e.createElement(m,{sx:{p:2,px:3}},e.createElement(f,{color:"inherit",onClick:function(e){e&&e.currentTarget.blur(),W()},sx:{fontWeight:700,color:"text.secondary",minWidth:150}},O),e.createElement(f,{type:"submit",variant:"contained",color:"primary",sx:{borderRadius:2,px:4,fontWeight:700,boxShadow:"none",minWidth:150,"&:hover":{boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}},A?e.createElement(v,{size:20,sx:{color:"inherit"}}):V))))},Oe=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.maxLength,L=void 0===T?255:T,R=t.message,k=void 0===R?null:R,I=t.hasDivider,F=void 0===I||I,P=ee(e.useState(!1),2),j=P[0],V=P[1],D=!o&&b,O=ee(e.useState(!1),2),M=O[0],K=O[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:D?"contained":"outlined",color:D?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),V(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),F&&e.createElement(d,{component:"li"}),e.createElement(Ce,{open:j,title:C,label:r,value:o,required:b,maxLength:L,onSubmit:function(e){K(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){K(!1),V(!1)}})},onCancel:function(){return V(!1)},message:k,isLoading:M}))},Me=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.maxLength,L=void 0===T?255:T,R=t.message,k=void 0===R?null:R,I=t.hasDivider,F=void 0===I||I,P=ee(e.useState(!1),2),j=P[0],V=P[1],D=!o&&b,O=ee(e.useState(!1),2),M=O[0],K=O[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:D?"contained":"outlined",color:D?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),V(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),F&&e.createElement(d,{component:"li"}),e.createElement(qe,{open:j,title:C,label:r,value:o,required:b,maxLength:L,onSubmit:function(e){K(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){K(!1),V(!1)}})},onCancel:function(){return V(!1)},message:k,isLoading:M}))},Ke=function(t){var r,o=t.label,i=t.value,a=t.render,s=void 0===a?null:a,u=t.fieldName,m=void 0===u?null:u,v=t.editable,p=void 0!==v&&v,b=t.required,h=void 0===b||b,E=t.placeholder,S=void 0===E?"":E,C=t.modalTitle,z=void 0===C?"Επεξεργασία":C,q=t.updateUrl,T=void 0===q?null:q,L=t.message,R=void 0===L?null:L,k=t.hasDivider,I=void 0===k||k,j=ee(e.useState(!1),2),D=j[0],O=j[1],M=!i&&h,K=ee(e.useState(!1),2),N=K[0],B=K[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},o)),e.createElement(g,{size:{xs:12,sm:6}},h&&!i?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):s||e.createElement(c,{variant:"body1",fontWeight:500},i?(r=i)?F(P(r,{locale:V}),"dd/MM/yyyy, HH:mm"):"":S)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},p&&e.createElement(f,{size:"small",variant:M?"contained":"outlined",color:M?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i?"Επεξεργασία":"Συμπλήρωση")))),I&&e.createElement(d,{component:"li"}),e.createElement(Fe,{open:D,title:z,label:o,value:i,required:h,onSubmit:function(e){B(!0),y.put(T,{field:m,value:e},{preserveScroll:!0,onFinish:function(){B(!1),O(!1)}})},onCancel:function(){return O(!1)},message:R,isLoading:N}))},Ne=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.message,L=void 0===T?null:T,R=t.hasDivider,k=void 0===R||R,I=ee(e.useState(!1),2),F=I[0],P=I[1],j=!o&&b,V=ee(e.useState(!1),2),D=V[0],O=V[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o?de(o):E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:j?"contained":"outlined",color:j?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),P(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),k&&e.createElement(d,{component:"li"}),e.createElement(Pe,{open:F,title:C,label:r,value:o,required:b,onSubmit:function(e){O(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){O(!1),P(!1)}})},onCancel:function(){return P(!1)},message:L,isLoading:D}))},Be=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.rows,L=void 0===T?5:T,R=t.message,k=void 0===R?null:R,I=t.hasDivider,F=void 0===I||I,P=ee(e.useState(!1),2),j=P[0],V=P[1],D=!o&&b,O=ee(e.useState(!1),2),M=O[0],K=O[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500,sx:{whiteSpace:"pre-line"}},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:D?"contained":"outlined",color:D?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),V(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),F&&e.createElement(d,{component:"li"}),e.createElement(ke,{open:j,title:C,label:r,value:o,required:b,rows:L,onSubmit:function(e){K(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){K(!1),V(!1)}})},onCancel:function(){return V(!1)},message:k,isLoading:M}))},He=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.options,u=void 0===s?[]:s,m=t.valueKey,v=void 0===m?"id":m,p=t.labelKey,b=void 0===p?"label":p,h=t.fieldName,E=void 0===h?null:h,S=t.editable,C=void 0!==S&&S,z=t.required,q=void 0===z||z,T=t.placeholder,L=void 0===T?"":T,R=t.modalTitle,k=void 0===R?"Επεξεργασία":R,I=t.updateUrl,F=void 0===I?null:I,P=t.message,j=void 0===P?null:P,V=t.hasDivider,D=void 0===V||V,O=ee(e.useState(!1),2),M=O[0],K=O[1],N=null==o&&q,B=ee(e.useState(!1),2),H=B[0],A=B[1],U=u.find((function(e){return e[v]===o})),_=U?U[b]:"";return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},q&&null==o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},_||L)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},C&&e.createElement(f,{size:"small",variant:N?"contained":"outlined",color:N?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),K(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),D&&e.createElement(d,{component:"li"}),e.createElement(Te,{open:M,title:k,label:r,value:o,options:u,valueKey:v,labelKey:b,required:q,onSubmit:function(e){A(!0),y.put(F,{field:E,value:e.field},{preserveScroll:!0,onFinish:function(){A(!1),K(!1)}})},onCancel:function(){return K(!1)},message:j,isLoading:H}))},Ae=function(t){var r=t.label,n=t.value,o=t.render,i=void 0===o?null:o,a=t.fieldName,l=void 0===a?null:a,s=t.editable,u=void 0!==s&&s,m=t.activationLabel,v=void 0===m?"Ενεργοποίηση":m,p=t.deactivationLabel,b=void 0===p?"Απενεργοποίηση":p,h=t.activationMessage,E=void 0===h?"":h,S=t.deactivationMessage,W=void 0===S?"":S,w=t.updateUrl,q=void 0===w?null:w,T=t.hasDivider,L=void 0===T||T,R=ee(e.useState(!1),2),k=R[0],I=R[1],F=ee(e.useState(!1),2),P=F[0],j=F[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},i||e.createElement(c,{variant:"body1",fontWeight:500},n?1:0)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},u&&e.createElement(f,{size:"small",variant:"outlined",color:n?"error":"success",startIcon:n?e.createElement(C,{fontSize:"small"}):e.createElement(z,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),I(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},n?b:v)))),L&&e.createElement(d,{component:"li"}),e.createElement(Re,{open:k,title:n?b:v,message:n?W:E,onConfirm:function(){j(!0),y.put(q,{field:l,value:n?0:1},{preserveScroll:!0,onFinish:function(){j(!1),I(!1)}})},onCancel:function(){return I(!1)},isLoading:P}))},Ue=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.options,u=void 0===s?[]:s,m=t.valueKey,v=void 0===m?"id":m,p=t.labelKey,b=void 0===p?"label":p,h=t.fieldName,E=void 0===h?null:h,S=t.editable,C=void 0!==S&&S,z=t.required,q=void 0===z||z,T=t.placeholder,L=void 0===T?"":T,R=t.modalTitle,k=void 0===R?"Επεξεργασία":R,I=t.updateUrl,F=void 0===I?null:I,P=t.message,j=void 0===P?null:P,V=t.hasDivider,D=void 0===V||V,O=ee(e.useState(!1),2),M=O[0],K=O[1],N=q&&(!Array.isArray(o)||!o.length),B=ee(e.useState(!1),2),H=B[0],A=B[1],U=u.filter((function(e){return o.some((function(t){return t[v]===e[v]}))})).map((function(e){return e[b]})).join(", ");return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},!q||Array.isArray(o)&&o.length?a||e.createElement(c,{variant:"body1",fontWeight:500},U||L):e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}}))),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},C&&e.createElement(f,{size:"small",variant:N?"contained":"outlined",color:N?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),K(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},Array.isArray(o)&&o.length?"Επεξεργασία":"Συμπλήρωση")))),D&&e.createElement(d,{component:"li"}),e.createElement(Le,{open:M,title:k,label:r,value:o,options:u,valueKey:v,labelKey:b,required:q,onSubmit:function(e){A(!0),y.put(F,{field:E,value:e.field.map((function(e){return e[v]}))},{preserveScroll:!0,onFinish:function(){A(!1),K(!1)}})},onCancel:function(){return K(!1)},message:j,isLoading:H}))},_e=function(t){var r=t.label,o=t.exists,i=void 0!==o&&o,a=t.fileName,s=void 0===a?null:a,u=t.placeholder,m=void 0===u?"File":u,v=t.render,p=void 0===v?null:v,h=t.editable,E=void 0!==h&&h,S=t.required,w=void 0===S||S,C=t.downloadUrl,z=void 0===C?null:C,L=t.createUrl,R=void 0===L?null:L,k=t.updateUrl,I=void 0===k?null:k,F=t.deleteUrl,P=void 0===F?null:F,j=t.hasDivider,V=void 0===j||j,D=!i&&w,O=ee(e.useState(!1),2),M=O[0],K=O[1],N=ee(e.useState(!1),2),B=N[0],H=N[1],A=e.useRef(null);return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},w&&!i?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει επιλεγεί αρχείο"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):p||e.createElement(b,{href:z,download:s,underline:"hover"},e.createElement(c,{variant:"body1",fontWeight:500},s||m))),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},E&&e.createElement(l,{direction:"row",spacing:1},i&&P&&e.createElement(f,{size:"small",variant:"outlined",color:"error",onClick:function(e){e.currentTarget.blur(),H(!0)},disabled:M,sx:{minWidth:"auto",px:1.5,borderRadius:2}},e.createElement(q,{fontSize:"small"})),e.createElement(f,{size:"small",variant:D?"contained":"outlined",color:D?"error":"primary",startIcon:e.createElement(T,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),A.current.click()},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i?"Αντικατάσταση":"Επιλογή"))))),V&&e.createElement(d,{component:"li"}),e.createElement("input",{type:"file",ref:A,onChange:function(e){var t=e.target.files[0];t&&(K(!0),y.post(i?I:R,{file:t},{forceFormData:!0,preserveScroll:!0,onFinish:function(){K(!1),e.target.value=""}}))},style:{display:"none"}}),e.createElement(Re,{open:B,title:"Επιβεβαίωση Διαγραφής",message:"Να διαγραφεί το επιλεγμένο αρχείο;",onConfirm:function(){K(!0),y.delete(P,{preserveScroll:!0,onFinish:function(){K(!1),H(!1)}})},onCancel:function(){return H(!1)}}))},Ye=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.minValue,L=void 0===T?null:T,R=t.maxValue,k=void 0===R?null:R,I=t.message,F=void 0===I?null:I,P=t.hasDivider,j=void 0===P||P,V=ee(e.useState(!1),2),D=V[0],O=V[1],M=!o&&b,K=ee(e.useState(!1),2),N=K[0],B=K[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o?ce(o):E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:M?"contained":"outlined",color:M?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),j&&e.createElement(d,{component:"li"}),e.createElement(Ie,{open:D,title:C,label:r,value:o,required:b,minValue:L,maxValue:k,onSubmit:function(e){B(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){B(!1),O(!1)}})},onCancel:function(){return O(!1)},message:F,isLoading:N}))},$e=function(t){var r=t.title,n=t.children,o=t.sx,i=void 0===o?{}:o,a=t.titleBgColor,l=void 0===a?"rgba(25, 118, 210, 0.08)":a,d=t.titleColor,u=void 0===d?"primary.main":d,m=t.titleFontWeight,f=void 0===m?"bold":m;return e.createElement(h,{variant:"outlined",sx:Q({mb:3,overflow:"hidden"},i)},e.createElement(s,{sx:{px:2,py:1.5,bgcolor:l}},e.createElement(c,{variant:"subtitle2",color:u,fontWeight:f},r)),e.createElement(E,{disablePadding:!0},n))},Ge=function(t){var r=t.label,o=void 0===r?"Πρωτόκολλο":r,i=t.registrationNumber,a=t.registrationDate,s=t.registrationNumberLabel,u=void 0===s?"Αριθμός Πρωτοκόλλου":s,m=t.registrationDateLabel,v=void 0===m?"Ημερομηνία Πρωτοκόλλου":m,p=t.render,b=void 0===p?null:p,h=t.editable,E=void 0!==h&&h,S=t.required,C=void 0===S||S,z=t.placeholder,q=void 0===z?"----------":z,T=t.modalTitle,L=void 0===T?"Επεξεργασία Πρωτοκόλλου":T,R=t.updateUrl,k=void 0===R?null:R,I=t.registrationNumberMaxLength,F=void 0===I?255:I,P=t.message,j=void 0===P?null:P,V=t.hasDivider,D=void 0===V||V,O=ee(e.useState(!1),2),M=O[0],K=O[1],N=(!i||!a)&&C,B=ee(e.useState(!1),2),H=B[0],A=B[1],U=i&&a?"".concat(i,"/").concat(de(a,"-")):q;return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},o)),e.createElement(g,{size:{xs:12,sm:6}},!C||i&&a?b||e.createElement(c,{variant:"body1",fontWeight:500},U):e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}}))),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},E&&e.createElement(f,{size:"small",variant:N?"contained":"outlined",color:N?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),K(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i||a?"Επεξεργασία":"Συμπλήρωση")))),D&&e.createElement(d,{component:"li"}),e.createElement(De,{open:M,title:L,registrationNumberLabel:u,registrationDateLabel:v,registrationNumber:i,registrationDate:a,required:C,registrationNumberMaxLength:F,registrationNumberRequiredMessage:"Συμπληρώστε τον αριθμό πρωτοκόλλου",registrationDateRequiredMessage:"Συμπληρώστε ή επιλέξτε την ημερομηνία πρωτοκόλλου",onSubmit:function(e){A(!0),y.put(k,e,{preserveScroll:!0,onFinish:function(){A(!1),K(!1)}})},onCancel:function(){return K(!1)},message:j,isLoading:H}))},Ze=function(t){var r,o=t.label,i=t.value,a=t.render,s=void 0===a?null:a,u=t.fieldName,m=void 0===u?null:u,v=t.editable,p=void 0!==v&&v,b=t.required,h=void 0===b||b,E=t.placeholder,S=void 0===E?"":E,C=t.modalTitle,z=void 0===C?"Επεξεργασία":C,q=t.updateUrl,T=void 0===q?null:q,L=t.message,R=void 0===L?null:L,k=t.hasDivider,I=void 0===k||k,j=ee(e.useState(!1),2),D=j[0],O=j[1],M=!i&&h,K=ee(e.useState(!1),2),N=K[0],B=K[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},o)),e.createElement(g,{size:{xs:12,sm:6}},h&&!i?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):s||e.createElement(c,{variant:"body1",fontWeight:500},i?(r=i)?F(P(r,{locale:V}),"HH:mm"):"":S)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},p&&e.createElement(f,{size:"small",variant:M?"contained":"outlined",color:M?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},i?"Επεξεργασία":"Συμπλήρωση")))),I&&e.createElement(d,{component:"li"}),e.createElement(Ve,{open:D,title:z,label:o,value:i,required:h,onSubmit:function(e){B(!0),y.put(T,{field:m,value:e},{preserveScroll:!0,onFinish:function(){B(!1),O(!1)}})},onCancel:function(){return O(!1)},message:R,isLoading:N}))},Je=function(t){var r=t.label,o=t.value,i=t.render,a=void 0===i?null:i,s=t.fieldName,u=void 0===s?null:s,m=t.editable,v=void 0!==m&&m,p=t.required,b=void 0===p||p,h=t.placeholder,E=void 0===h?"":h,S=t.modalTitle,C=void 0===S?"Επεξεργασία":S,z=t.updateUrl,q=void 0===z?null:z,T=t.minValue,L=void 0===T?null:T,R=t.maxValue,k=void 0===R?null:R,I=t.message,F=void 0===I?null:I,P=t.hasDivider,j=void 0===P||P,V=ee(e.useState(!1),2),D=V[0],O=V[1],M=!o&&b,K=ee(e.useState(!1),2),N=K[0],B=K[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},b&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):a||e.createElement(c,{variant:"body1",fontWeight:500},o||E)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},v&&e.createElement(f,{size:"small",variant:M?"contained":"outlined",color:M?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),O(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),j&&e.createElement(d,{component:"li"}),e.createElement(je,{open:D,title:C,label:r,value:o,required:b,minValue:L,maxValue:k,onSubmit:function(e){B(!0),y.put(q,{field:u,value:e},{preserveScroll:!0,onFinish:function(){B(!1),O(!1)}})},onCancel:function(){return O(!1)},message:F,isLoading:N}))},Qe=function(t){var r=t.label,o=t.value,i=t.decimals,a=void 0===i?2:i,s=t.render,u=void 0===s?null:s,m=t.fieldName,v=void 0===m?null:m,p=t.editable,b=void 0!==p&&p,h=t.required,E=void 0===h||h,S=t.placeholder,C=void 0===S?"":S,z=t.modalTitle,q=void 0===z?"Επεξεργασία":z,T=t.updateUrl,L=void 0===T?null:T,R=t.minValue,k=void 0===R?null:R,I=t.maxValue,F=void 0===I?null:I,P=t.message,j=void 0===P?null:P,V=t.hasDivider,D=void 0===V||V,O=ee(e.useState(!1),2),M=O[0],K=O[1],N=!o&&E,B=ee(e.useState(!1),2),H=B[0],A=B[1];return e.createElement(e.Fragment,null,e.createElement(x,{sx:{py:2.5,px:4}},e.createElement(g,{container:!0,spacing:2,sx:{width:"100%"},alignItems:"center"},e.createElement(g,{size:{xs:12,sm:3}},e.createElement(c,{variant:"subtitle2",color:"text.secondary",fontWeight:600},r)),e.createElement(g,{size:{xs:12,sm:6}},E&&!o?e.createElement(l,{direction:"row",spacing:1,alignItems:"center"},e.createElement(c,{variant:"body1",color:"error.main",fontWeight:600},"Δεν έχει καταχωρηθεί"),e.createElement(n,{size:"small",color:"error",variant:"soft",label:"Απαιτείται",icon:e.createElement(W,{sx:{fontSize:"14px !important"}}),sx:{fontWeight:700,height:22}})):u||e.createElement(c,{variant:"body1",fontWeight:500},o?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!le(e))return new Intl.NumberFormat("el-GR",{minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}(o,a):C)),e.createElement(g,{size:{xs:12,sm:3},sx:{display:"flex",justifyContent:"flex-end"}},b&&e.createElement(f,{size:"small",variant:N?"contained":"outlined",color:N?"error":"primary",startIcon:e.createElement(w,{fontSize:"small"}),onClick:function(e){e.currentTarget.blur(),K(!0)},sx:{borderRadius:2,textTransform:"none",fontWeight:700,minWidth:"120px"}},o?"Επεξεργασία":"Συμπλήρωση")))),D&&e.createElement(d,{component:"li"}),e.createElement(DecimalModalForm,{open:M,title:q,label:r,value:o,decimals:a,required:E,minValue:k,maxValue:F,onSubmit:function(e){A(!0),y.put(L,{field:v,value:e},{preserveScroll:!0,onFinish:function(){A(!1),K(!1)}})},onCancel:function(){return K(!1)},message:j,isLoading:H}))};export{Ue as AutocompleteMultiProperty,He as AutocompleteProperty,Ye as CurrencyProperty,Ne as DateProperty,Ke as DateTimeProperty,Qe as DecimalProperty,Me as EmailProperty,_e as FileProperty,Je as IntegerProperty,$e as PropertyGroup,Ge as RegistrationProperty,Oe as StringProperty,Be as TextProperty,Ze as TimeProperty,Ae as ToggleProperty};
|