import {
  SourceInterface,
  WidgetConfigInterface,
  DataItemInterface,
  DataItemHistoryOptionsInterface,
} from "..";

export interface WidgetContextInterface {
  config: WidgetConfigInterface;
  draft: WidgetConfigInterface;
  updateDraft: (
    f: (draft: WidgetConfigInterface) => void | WidgetConfigInterface
  ) => void;
  replaceDraft: (replacement: WidgetConfigInterface) => void;
  assignToDraft: (objectToAssign: WidgetConfigInterface) => void;
  saveDraft: () => void;
  setLoading: (loading: boolean) => void;
  useContainerSize: () => {
    width: number;
    height: number;
  };
  useSourceConfig: () => SourceInterface[];
  useItemConfig: () => DataItemInterface[];
  useItemDimensionConfig: () => [DataItemInterface, number][];
  useHistoryConfig: () => DataItemHistoryOptionsInterface;
}
