/** 앱 전역 상태 */
import products from '../data/index.js';
import { STATUS_META } from './config.js';

export const productsData = products;

export const state = {
    currentPage: 1,
    activeCategories: new Set(['All']),
    visibleProducts: [...products],
    searchKeyword: '',
    activeStatuses: new Set(
        Object.entries(STATUS_META)
            .filter(([_, meta]) => meta.defaultVisible)
            .map(([status]) => status),
    ),
};
