You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Global/store/modules/modal/getters.js

19 lines
639 B

export default {
getDialogProperties:(state) => state.dialogProperties,
getDialogType:(state) => state.dialogType,
isModal: (state) => (...names) => {
for (const name of names) {
if (state.modals.findIndex(x => x.name == name) != -1) {
return true;
}
}
return false;
},
getModal:(state) => (name) => state.modals[state.modals.findIndex(x => x.name == name)],
getModals:(state) => state.modals,
getActiveModal:(state) => state.modals[state.modals.length],
isActiveModal:(state) => (name) => state.modals[state.modals.length].name == name,
};