'use strict';
import { c } from 'react/compiler-runtime';
import { jsx } from 'react/jsx-runtime';
import { createContext, useState, useContext } from 'react';
import { sidebarStatuses } from '../../enums/sidebar-status.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
const SidebarContext = createContext(void 0);
function SidebarProvider(t0) {
  const $ = c(4);
  const {
    children
  } = t0;
  const [sidebarStatus, setSidebarStatus] = useState(sidebarStatuses.minified);
  const t1 = sidebarStatus === sidebarStatuses.fixedOpen;
  let t2;
  if ($[0] !== children || $[1] !== sidebarStatus || $[2] !== t1) {
    const sidebarContextValue = {
      sidebarStatus,
      setSidebarStatus,
      sidebarOpen: t1
    };
    t2 = jsx(SidebarContext.Provider, {
      value: sidebarContextValue,
      children
    });
    $[0] = children;
    $[1] = sidebarStatus;
    $[2] = t1;
    $[3] = t2;
  } else {
    t2 = $[3];
  }
  return t2;
}
__name(SidebarProvider, "SidebarProvider");
function useSidebarContext() {
  return useContext(SidebarContext);
}
__name(useSidebarContext, "useSidebarContext");

export { SidebarContext, SidebarProvider, useSidebarContext };
