koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
32 lines (31 loc) • 712 B
JavaScript
"use client";
import { without as p } from "../../internal/utils/without.js";
var t = /* @__PURE__ */ ((e) => (e.DIALOG_CLOSE = "DIALOG_CLOSE", e.DIALOG_OPEN = "DIALOG_OPEN", e))(t || {});
const L = {
open: []
}, u = (e = L, n) => {
switch (n.type) {
case "DIALOG_CLOSE": {
const { id: r } = n, O = p(({ id: o }) => o !== r, e.open);
return {
...e,
open: O
};
}
case "DIALOG_OPEN": {
const { id: r, params: O } = n;
return {
...e,
open: [...e.open, { id: r, params: O }]
};
}
default:
return e;
}
};
export {
t as Actions,
u as DialogReducer,
L as initialState
};
//# sourceMappingURL=DialogReducer.js.map