import React, {useContext, useEffect, useState, forwardRef, HTMLAttributes, CSSProperties} from 'react';
import {ThemeContext} from "../contexts/contexts";
import {
Accordion as SAccordion,
Breadcrumb as SBreadcrumb,
Button as SButton,
Card as SCard,
Divider as SDivider,
Form as SForm,
FormField as SFormField,
FormGroup as SFormGroup,
FormInput as SFormInput,
Header as SHeader,
Icon as SIcon,
Loader as SLoader,
Menu as SMenu,
Modal as SModal,
ModalActions as SModalActions,
ModalContent as SModalContent,
ModalDescription as SModalDescription,
ModalHeader as SModalHeader,
Placeholder as SPlaceholder,
Popup as SPopup,
Progress as SProgress,
Segment as SSegment,
Statistic as SStatistic,
StatisticGroup as SStatisticGroup,
Tab as STab,
Table as STable,
TableBody as STableBody,
TableCell as STableCell,
TableFooter as STableFooter,
TableHeader as STableHeader,
TableHeaderCell as STableHeaderCell,
TableRow as STableRow,
TabPane as STabPane,
TextArea as STextArea,
AccordionProps,
BreadcrumbProps,
ButtonProps,
CardProps as SCardProps,
DividerProps,
FormProps,
FormFieldProps,
FormGroupProps,
FormInputProps,
HeaderProps,
IconProps,
LoaderProps,
MenuProps,
ModalProps,
ModalActionsProps,
ModalContentProps,
ModalDescriptionProps,
ModalHeaderProps,
PlaceholderProps,
PopupProps,
ProgressProps,
SegmentProps,
StatisticProps,
StatisticGroupProps,
TabProps,
TableProps,
TableBodyProps,
TableCellProps,
TableFooterProps,
TableHeaderProps,
TableHeaderCellProps,
TableRowProps,
TabPaneProps,
TextAreaProps,
} from "semantic-ui-react";
import {ColorToSemanticHexColor} from "./Common";
import _ from "lodash";
import {ThemeContextValue, ThemeName, SavedThemeName} from "../types/theme";
export const darkTheme = 'dark';
export const lightTheme = 'light';
export const defaultTheme = lightTheme;
export const systemTheme = 'system';
export const themeSessionKey = 'color-scheme';
interface ThemeProviderProps {
children: React.ReactNode;
}
export function ThemeProvider({children, ...props}: ThemeProviderProps) {
if (!_.isEmpty(props)) {
console.log(props);
console.error('ThemeWrapper does not support props!');
}
// Properties to manipulate elements with theme.
// Invert when Semantic supports it. Example: