import { cacheInfo } from "../../../Utils/cachedInfoUtils.js";

const useSelectViewModeUI = ({ setViewMode, localStorageKey }) => {
    const selectStyle = {
        width: "100%",
    };

    const handleChange = (value) => {
        setViewMode(value);
        cacheInfo(localStorageKey, value);
    };

    return {
        selectStyle,
        handleChange,
    };
};

export default useSelectViewModeUI;