import { createContext, CSSProperties } from 'rax';

export interface FormContextProps {
  styles: {
    form: CSSProperties;
    subHeader: CSSProperties;
    footer: CSSProperties;
    content: CSSProperties;
    item: CSSProperties;
    itemContainer: CSSProperties;
    itemLabel: CSSProperties;
    itemInnerContainer: CSSProperties;
    itemInnerLabel: CSSProperties;
    itemInput: CSSProperties;
    itemLabelContainer: CSSProperties;
    itemLabelInnerContainer: CSSProperties;
    itemRequiredText: CSSProperties;
    itemHelp: CSSProperties;
    itemHelpText: CSSProperties;
    itemErrorText: CSSProperties;
    itemInnerRequiredText: CSSProperties;
  };
  labelType: 'inner' | 'upper';
  labelWidth: string | number;
}

export default createContext<FormContextProps>({
  styles: {
    form: {},
    subHeader: {},
    footer: {},
    content: {},
    item: {},
    itemContainer: {},
    itemLabel: {},
    itemInnerContainer: {},
    itemLabelContainer: {},
    itemLabelInnerContainer: {},
    itemRequiredText: {},
    itemInnerLabel: {},
    itemInput: {},
    itemHelp: {},
    itemHelpText: {},
    itemErrorText: {},
    itemInnerRequiredText: {},
  },
  labelType: 'upper',
  labelWidth: 'auto',
});
