"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),d=require("react"),i=require("react-redux"),o=require("semantic-ui-react"),p=require("lodash.isequal"),g=l=>{const{"data-group":r,"data-reset-label":u="Reset All Filters"}=l,c=i.useDispatch(),n=i.useSelector(a=>a.getIn(["data","posts",r])),t=i.useSelector(a=>a.getIn(["data","posts","initialFilters",r])),e=d.useMemo(()=>n&&t?!p(n,t):!1,[n,t]);return s.jsxs(o.Container,{fluid:!0,style:{pointerEvents:e?"auto":"none",cursor:e?"pointer":"not-allowed",opacity:e?1:.5},className:`data-filters-reset ignore ${e?"":"disabled"}`,onClick:()=>{c({type:"SET_INITIAL_POSTS_FILTER",group:r,...t,reset:!0,page:1})},children:[s.jsx("span",{children:u}),s.jsx("span",{children:s.jsx(o.Icon,{disabled:!e,name:"undo alternate",className:"custom-undo-icon"})})]})};exports.default=g;
