"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const D=require("react/jsx-runtime"),L=require("react"),q=require("./PostsFilterDropdown.js"),v=require("@devgateway/wp-react-lib"),x=o=>{const{group:r,placeholder:s,allLabel:n,noneLabel:l,useSingleColumn:c,enableTextSearch:i,filterType:u,showNoDataOption:p,closeOnSelect:d,allNoneSameBehaviour:f,autoApply:g,alphabeticalSort:h,ascOrder:S,onChange:b,yearOptions:F,setYearOptions:y,yearFilterLoading:R,setYearFilterLoading:t,...O}=o,Y=async()=>{t(!0);const w=(await v.getYearRange()).data.map(e=>({key:e,value:e,text:e.toString()}));return t(!1),w};return L.useEffect(()=>{(async()=>{const a=await Y();y(a)})()},[]),D.jsx(q.default,{...O,group:r,placeholder:s,allLabel:n,noneLabel:l,useSingleColumn:c,enableTextSearch:i,filterType:u,showNoDataOption:p,closeOnSelect:d,allNoneSameBehaviour:f,autoApply:g,alphabeticalSort:h,ascOrder:S,onChange:b})};exports.default=x;
