"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateBackState = exports.publishMock = exports.saveMock = exports.updateMockId = exports.updateMockModalVisible = exports.updateMockLoading = exports.updateDSLModalVisible = exports.pushDsl = exports.fetchDsl = exports.updateDSLLoading = exports.pushPageTemplate = exports.fetchPageTemplate = exports.updateStoreModalVisible = exports.updateStoreLoading = exports.updateContentInfo = exports.selectContent = exports.updateFileFold = exports.pushCatalog = exports.fetchCatalog = exports.updateLocale = exports.updateLoading = exports.clearAll = void 0;
const typesafe_actions_1 = require("typesafe-actions");
exports.clearAll = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__CLEAR_ALL', () => ({}))();
exports.updateLoading = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_LOADING', (loading) => ({
    loading,
}))();
exports.updateLocale = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_LOCALE', (locale) => ({
    locale,
}))();
exports.fetchCatalog = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__FETCH_CATALOG', (params) => (Object.assign({}, params)))();
exports.pushCatalog = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__PUSH_CATALOG', (data) => ({
    data,
}))();
exports.updateFileFold = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_FILE_FOLD', (id, fold = false) => ({
    id,
    fold,
}))();
// after select new content
exports.selectContent = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__SELECT_CONTENT', (params) => (Object.assign({}, params)))();
exports.updateContentInfo = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_CONTENT_INFO', (params) => (Object.assign({}, params)))();
// store related
exports.updateStoreLoading = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_STORE_LOADING', (loading) => ({
    loading,
}))();
exports.updateStoreModalVisible = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_PAGE_COPY_MODAL_VISIBLE', (open, type) => ({
    open,
    type,
}))();
exports.fetchPageTemplate = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__FETCH_PAGE_TEMPLATE', (params) => ({
    params,
}))();
exports.pushPageTemplate = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__PUSH_PAGE_TEMPLATE', (list, pageInfo) => ({
    list,
    pageInfo,
}))();
// more
exports.updateDSLLoading = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_DSL_LOADING', (loading) => ({
    loading,
}))();
exports.fetchDsl = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__FETCH_DSL', (params) => (Object.assign({}, params)))();
exports.pushDsl = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__PUSH_DSL', (dsl) => ({
    dsl,
}))();
exports.updateDSLModalVisible = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_DSL_MODAL_VISIBLE', (open) => ({
    open,
}))();
// mock
exports.updateMockLoading = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_MOCK_LOADING', (loading) => ({
    loading,
}))();
exports.updateMockModalVisible = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_MOCK_MODAL_VISIBLE', (open) => ({
    open,
}))();
exports.updateMockId = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_MOCK_ID', (id) => ({
    id,
}))();
exports.saveMock = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__SAVE_MOCK', (params, cb) => ({
    params,
    cb,
}))();
exports.publishMock = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__PUBLISH_MOCK', (params, cb) => ({
    params,
    cb,
}))();
// for go back action
exports.updateBackState = (0, typesafe_actions_1.createAction)('BUILDER_HEADER__UPDATE_BACK_STATE', (state) => ({
    state,
}))();
