import { QUERIES as e } from "../../../types/Devices.js";
//#region lib/ui/contexts/devices/reducers/reducer.ts
var t = (e, t) => {
	switch (t.type) {
		case "small": return {
			...e,
			small: t.payload
		};
		case "medium": return {
			...e,
			medium: t.payload
		};
		case "large": return {
			...e,
			large: t.payload
		};
		case "xlarge": return {
			...e,
			xlarge: t.payload
		};
		default: return e;
	}
}, n = ({ device: t, direction: n }) => typeof window < "u" ? {
	direction: n,
	all: !0,
	small: window.matchMedia(e.SMALL).matches,
	medium: window.matchMedia(e.MEDIUM).matches,
	large: window.matchMedia(e.LARGE).matches,
	xlarge: window.matchMedia(e.XLARGE).matches
} : {
	direction: n,
	all: !0,
	small: t === "small" || t === "medium" || t === "large" || t === "xlarge",
	medium: t === "medium" || t === "large" || t === "xlarge",
	large: t === "large" || t === "xlarge",
	xlarge: t === "xlarge"
};
//#endregion
export { n as getInitialState, t as reducer };

//# sourceMappingURL=reducer.js.map