import {
    DEL_ITEMS,
    INIT_ITEMS,
    TAB_CHANGE,
    CKECK_ITEMS,
    BATCH_DEL_ITEMS,
    ALL_CHECKED,
    CHANGE_TITLE,
    CHANGE_VISIBLE,
    SHOW_MESSAGE,
    KEEP_PUSH_DATA,
    ALL_CHECKED_SHOW,
} from '@store/types/tabTemplate';

export const delItems = (id) => ({ //删除模板
    type: DEL_ITEMS,
    id
});
export const tabChange = (idx) => ({ //tab切换
    type: TAB_CHANGE,
    idx
});
export const initItems = (state) => ({ //数据初始化
    type: INIT_ITEMS,
    state
});
export const checkItems = (id) => ({ //选中的模板
    type: CKECK_ITEMS,
    id
});
export const batchDelItems = (ids) => ({ //删除选中的模板
    type: BATCH_DEL_ITEMS,
    ids
});
export const allChecked = (bool, flg) => ({ //全选反选
    type: ALL_CHECKED,
    bool
});
export const changeTitle = (obj) => ({ //全选反选
    type: CHANGE_TITLE,
    obj
});
export const changeVisible = (bool) => ({ //弹窗
    type: CHANGE_VISIBLE,
    bool
});
export const keepPushData = (data,flg) => ({ //引用的数据
    type: KEEP_PUSH_DATA,
    data,
    flg
});
export const showMsg = (bool) => ({ //tip提示
    type: SHOW_MESSAGE,
    bool
});
export const allCheckedShow = (bool) => ({ 
    type: ALL_CHECKED_SHOW,
    bool
});