!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],r):"object"==typeof exports?exports["openstack-uicore-foundation"]=r():e["openstack-uicore-foundation"]=r()}(this,(()=>(()=>{"use strict";var e={1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},5643:e=>{e.exports=require("@mui/x-date-pickers/AdapterMoment")},4:e=>{e.exports=require("@mui/x-date-pickers/LocalizationProvider")},3294:e=>{e.exports=require("formik")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var i=r[o]={exports:{}};return e[o](i,i.exports,t),i.exports}(()=>{t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r}})(),(()=>{t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})}})(),(()=>{t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};t.r(o),t.d(o,{default:()=>g});var n=t(6031),i=t.n(n),a=t(1116),s=t.n(a),l=t(2462),u=t.n(l),p=t(2015),c=t.n(p),d=t(9825),b=t.n(d);const f=require("@mui/x-date-pickers/DatePicker");var y=t(4),m=t(5643),x=t(3294);const O=["name","label","required","disabled","slotProps"];function P(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?P(Object(t),!0).forEach((function(r){s()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const j=e=>{let{name:r,label:t,required:o,disabled:n=!1,slotProps:a}=e,s=u()(e,O);const[l,p,d]=(0,x.useField)(r),b=o?`${t} *`:t;return c().createElement(y.LocalizationProvider,{dateAdapter:m.AdapterMoment},c().createElement(f.DatePicker,i()({value:l.value,onChange:d.setValue,slotProps:v(v({day:{sx:{fontSize:"1.2rem",fontWeight:600}},layout:{sx:{"& .MuiDayCalendar-weekDayLabel":{fontSize:"1rem"}}}},a),{},{textField:v({name:r,label:b,error:p.touched&&Boolean(p.error),helperText:p.touched&&p.error,fullWidth:!0,disabled:n,size:"small"},(null==a?void 0:a.textField)||{})}),margin:"normal"},s)))};j.propTypes={name:b().string.isRequired,label:b().string,required:b().bool,disabled:b().bool};const g=j;return o})()));
//# sourceMappingURL=datepicker.js.map