import{D as o}from"./index-DMcXiZMh.js";import{_ as i,k as m,r as c,o as d,b as u,l as f}from"./main-DtyiNRRn.js";import{_ as p}from"./dateMixin.vue_vue_type_script_lang-DOBw9JOo.js";const _={name:"DateFacetFi",components:{DatepickerFi:o},mixins:[m,p],props:{label:{type:String,default:""},date:{type:[String,Object],default:null},inputName:{type:String,default:""},enableDatesInPast:{type:Boolean,default:!1}},emits:["change"],data(){return{datesInPast:t=>{const e=new Date(t),a=new Date;return e.getTime()<a.getTime()}}},computed:{name(){return this.inputName?this.inputName:this.label.toLowerCase()},maxDate(){return new Date().toISOString().split("T")[0]}},methods:{onDateChange(t){const e={value:!!t,type:"date",element:{date:t}};this.$emit("change",e)}}},b={class:"date-facet-fi"};function D(t,e,a,g,l,n){const s=c("datepicker-fi");return d(),u("div",b,[f(s,{class:"datepicker-fi--dark-label",value:a.date,clearable:!1,label:a.label,name:`date-facet-fi__${n.name}-input`,"allowed-dates":a.enableDatesInPast?l.datesInPast:null,"max-date":a.enableDatesInPast?n.maxDate:null,range:"",large:"","dark-label":"","enable-fullscreen-for-mobile":"",onInput:e[0]||(e[0]=r=>n.onDateChange(r))},null,8,["value","label","name","allowed-dates","max-date"])])}const I=i(_,[["render",D]]);export{I as D};