import { createContext } from "react";
import { getClassString } from "../../../utils/getClassString";
import type { INavigationContextValue } from "../config/types";

const defaultGetCN = (baseClass: string) =>
  (elem = "", mod = {}) => getClassString(baseClass, elem, mod);

const NavigationContext = createContext<INavigationContextValue>({
  baseClass: "navigation",
  getCN: defaultGetCN("navigation"),
  form: null,
  items: [
    {
      isPrev: true,
      href: "#",
      icon: "icon-prev",
      isDisabled: true,
    },
    {
      isNext: true,
      href: "#",
      icon: "icon-next",
      isDisabled: false,
    },
  ],
  separator: "",
  name: "",
  handleClick: () => {},
});

export {
  NavigationContext,
};
