"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}}var r=t(e);function n(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 o(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e){return e&&e.name?e.name.split("_")[1]:""}function u(){return(u=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(t){var r=t.size,n=void 0===r?24:r,o=t.color,l=void 0===o?"currentColor":o,a=t.stroke,i=void 0===a?2:a,c=s(t,["size","color","stroke"]);return e.createElement("svg",u({className:"icon icon-tabler icon-tabler-calendar-event",width:n,height:n,viewBox:"0 0 24 24",strokeWidth:i,stroke:l,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},c),e.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.createElement("rect",{x:4,y:5,width:16,height:16,rx:2}),e.createElement("line",{x1:16,y1:3,x2:16,y2:7}),e.createElement("line",{x1:8,y1:3,x2:8,y2:7}),e.createElement("line",{x1:4,y1:11,x2:20,y2:11}),e.createElement("rect",{x:8,y:15,width:2,height:2}))}var p=["value","openCalendar","className","stringDate","stringDates","separator","handleValueChange","locale","placeholder","iconStyle"];exports.default=function(t){var n,u,s=t.value,y=t.openCalendar,d=t.className,v=void 0===d?"rmdp-input":d,b=t.stringDate,h=t.stringDates,O=t.separator,g=t.handleValueChange,m=t.locale,j=t.placeholder,w=t.iconStyle,x=void 0===w?{}:w,P=i(t,p);s=s||b||(null==h||null===(n=h.join)||void 0===n?void 0:n.call(h,O))||j||"";var E=e.useRef();return e.useEffect((function(){var e,t,r=E.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)})),r.default.createElement("div",{style:{position:"relative"}},r.default.createElement("input",a({ref:E,type:"text",onFocus:y,className:v,value:s,onChange:g,autoComplete:"off"},P)),r.default.createElement(f,{height:20,width:20,stroke:1.5,style:o((u={position:"absolute"},l(u,["fa","ar"].includes(c(m))?"left":"right","2.5px"),l(u,"top","50%"),l(u,"transform","translateY(-50%)"),l(u,"backgroundColor","inherit"),l(u,"cursor","pointer"),u),x),onClick:y}))};