import{ki as e}from"./vendor-frame-CwiylG4Y.js";import{nn as a}from"./vendor-all-2-BJdkbLSj.js";var t=e();function n({fromDate:e,toDate:n,onFromDateChange:o,onToDateChange:i,minDate:l,maxDate:d,noTopMargin:s}){return(0,t.jsxs)("div",{className:"flex gap-4 "+(s?"":"mt-[22px]"),children:[(0,t.jsx)(r,{id:"modal-from-date",label:(0,t.jsx)(a,{defaultMessage:"From",id:"dM+p3/YEXT"}),value:e,onChange:o,min:l?.toLocaleDateString("en-CA"),max:n}),(0,t.jsx)(r,{id:"modal-to-date",label:(0,t.jsx)(a,{defaultMessage:"To",id:"9j3hXO4Ojb"}),value:n,onChange:i,min:e,max:d?.toLocaleDateString("en-CA")})]})}function r({id:e,label:a,value:n,onChange:r,min:o,max:i}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 flex-1",children:[(0,t.jsx)("label",{htmlFor:e,className:"text-xs text-text-400",children:a}),(0,t.jsx)("div",{className:"flex items-center bg-bg-000 border border-border-300 rounded-lg px-3 py-2",children:(0,t.jsx)("input",{id:e,type:"date",value:n,onChange:e=>r?.(e.target.value),min:o,max:i,className:"flex-1 bg-transparent border-none outline-none text-text-100 text-sm [&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:opacity-50 [&::-webkit-calendar-picker-indicator]:hover:opacity-100"})})]})}export{n as t};