import { createContext, useState } from "react";
import { PropTypes } from "prop-types";

export const SidebarContext = createContext();

export const sidebarContextValues = {
  sidebarState: false,
};

export const SidebarContextProvider = (props) => {
  const [sideBarMobileState, setSidebarMobileState] = useState(false);

  return (
    <SidebarContext.Provider
      value={[sideBarMobileState, setSidebarMobileState]}
    >
      {props.children}
    </SidebarContext.Provider>
  );
};

SidebarContextProvider.propTypes = {
  children: PropTypes.any,
};
