"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e),o=t(e);function i(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");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:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e){return e&&e.name?e.name.split("_")[1]:""}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}var p=["size","color","stroke"];function y(e){var t=e.size,r=void 0===t?24:t,o=e.color,i=void 0===o?"currentColor":o,l=e.stroke,a=void 0===l?2:l,c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,p);return n.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-calendar-event",width:r,height:r,viewBox:"0 0 24 24",strokeWidth:a,stroke:i,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},c),n.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),n.createElement("rect",{x:4,y:5,width:16,height:16,rx:2}),n.createElement("line",{x1:16,y1:3,x2:16,y2:7}),n.createElement("line",{x1:8,y1:3,x2:8,y2:7}),n.createElement("line",{x1:4,y1:11,x2:20,y2:11}),n.createElement("rect",{x:8,y:15,width:2,height:2}))}var b=["value","className","separator","openCalendar","locale","iconStyle"];exports.default=function(t){var r,n=t.value,i=void 0===n?"":n,s=t.className,p=void 0===s?"rmdp-input":s;t.separator;var v=t.openCalendar,d=t.locale,O=t.iconStyle,g=void 0===O?{}:O,m=u(t,b),h=e.useRef();return e.useEffect((function(){var e,t,r=h.current,n=null==r||null===(e=r.parentNode)||void 0===e||null===(t=e.querySelector)||void 0===t?void 0:t.call(e,".rmdp-input-icon"),o=(null==r?void 0:r.clientHeight)-5+"px";n&&(n.style.height=o,n.style.width=o)})),o.default.createElement("div",{style:{position:"relative"}},o.default.createElement("input",c({ref:h,type:"text",className:p,value:i,autoComplete:"off"},m)),o.default.createElement(y,{height:20,width:20,stroke:1.5,style:l((r={position:"absolute"},a(r,["fa","ar"].includes(f(d))?"left":"right","2.5px"),a(r,"top","50%"),a(r,"transform","translateY(-50%)"),a(r,"backgroundColor","inherit"),a(r,"cursor","pointer"),r),g),onClick:v}))};
