import type {
  IContacts,
  ISocials,
  ICompany,
  IColumn,
  IPolicies,
} from "../footer/webcomponent.type";
import type { IUserMenu } from "../navbar/webcomponent.type";
import type { INavLink } from "../sidenav-link/webcomponent.type";

export type I18nLanguageOption = { code: string; label: string };

export type Component = {
  i18nlang?: string;
  /** Languages offered in the sidebar language control (JSON string or array). */
  i18nlanguages?: I18nLanguageOption[] | string;
  id?: string;
  style?: string;
  page_title?: string;
  socials?: ISocials;
  contacts?: IContacts;
  company?: ICompany;
  navlinks?: INavLink[];
  pagename?: string;
  usermenu?: IUserMenu;
  cookielaw?: "yes" | "no" | null | "" | undefined;
  columns?: IColumn[];
  single_screen?: boolean;
  cookielawuri4more?: string;
  cookielawallowdecline?: "yes" | "no" | null | "" | undefined;
  cookielawlanguage?: string;
  sidebar?: { title?: string; logo?: string; type?: string, enablefooter?: "yes" | "no" | "false" | null | "" | undefined, enablethemeswitch?: "yes" | "no" | "false" | null | "" | undefined };
  footer?: {
    type?: "auto" | "small" | "regular" | "large";
    disable_expanding_small?: boolean;
  };
  policies?: IPolicies[];
  heders?: {
    name?: string;
    content: string;
    property?: string;
  }[];
};

export type Events = {
  offcanvasswitch: { isOpen: boolean };
  pageChange: { page: string };
  navbarDropDownClick: { key: string };
  footerClick: { elClick: string };
  navbarSlotClick: { side: "left" | "right" | "center" };
  themeChange: { mode: "light" | "dark" | "auto" };
  languageChange: { code: string };
};
