import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__testing_library_react__ from "@testing-library/react";
import * as __WEBPACK_EXTERNAL_MODULE__FilterProvider_mjs__ from "../FilterProvider.mjs";
describe('useFilter', ()=>{
    test('should get a empty array', ()=>{
        let getDataBlocks = null;
        const Comp = ()=>{
            ({ getDataBlocks } = (0, __WEBPACK_EXTERNAL_MODULE__FilterProvider_mjs__.useFilterBlock)());
            return null;
        };
        const App = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__FilterProvider_mjs__.FilterBlockProvider, {
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(Comp, {})
            });
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(App, {}));
        expect(getDataBlocks()).toEqual([]);
    });
    test('should not repeat', ()=>{
        let getDataBlocks = null, recordDataBlocks = null;
        const Comp = ()=>{
            ({ getDataBlocks, recordDataBlocks } = (0, __WEBPACK_EXTERNAL_MODULE__FilterProvider_mjs__.useFilterBlock)());
            return null;
        };
        const App = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__FilterProvider_mjs__.FilterBlockProvider, {
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(Comp, {})
            });
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(App, {}));
        recordDataBlocks({
            name: 'test',
            collection: {},
            doFilter: ()=>{}
        });
        expect(getDataBlocks().length).toBe(1);
        recordDataBlocks({
            name: 'test',
            collection: {},
            doFilter: ()=>{}
        });
        expect(getDataBlocks().length).toBe(1);
    });
});
