import { createBaseStore, setLoadingFlag, unsetLoadingFlag } from "../../common/interface/store.js";
function createRecsStore() {
    const store = createBaseStore({
        loadingFlags: [],
        iconAssetsPath: '',
        fieldsToInclude: [],
        resultList: void 0
    });
    return {
        ...store,
        unsetLoadingFlag (loadingFlag) {
            unsetLoadingFlag(store, loadingFlag);
        },
        setLoadingFlag (loadingFlag) {
            setLoadingFlag(store, loadingFlag);
        },
        getUniqueIDFromEngine (engine) {
            return engine.state.recommendation.searchUid;
        },
        addFieldsToInclude (fields) {
            const currentFields = store.state.fieldsToInclude;
            store.state.fieldsToInclude = [
                ...currentFields,
                ...fields
            ];
        }
    };
}
export { createRecsStore };
