import { PayloadAction } from '@reduxjs/toolkit'; import { ITab, WebformState } from '@qodly/shared'; export interface IRootState { tabs: ITab[]; filesLoading: boolean; activeTab: string; recent: ITab[]; clipboard: PayloadAction | null; } export type TActionAddDataSource = PayloadAction<{ datasourceDef: datasources.ICreateDataSource; path: string; }>; export type TActionAddWebformState = PayloadAction<{ stateDef: WebformState; path: string; }>; export type TActionRemoveWebformState = PayloadAction<{ path: string; state: WebformState; }>; export type TActionEditWebformState = PayloadAction<{ path: string; state: WebformState; oldLabel?: string; }>; export type TActionUpdateStateConditionDs = PayloadAction<{ path: string; old_reference: string; new_reference: string; }>; export type TResetComponentState = PayloadAction<{ path: string; id: string; state: WebformState; }>; export type TActionSetDefaultWebformStates = PayloadAction<{ path: string; states: WebformState[]; }>; export type TActionAddDefaultWebformState = PayloadAction<{ path: string; state: WebformState; }>; export type TActionRemoveDefaultWebformState = PayloadAction<{ path: string; state: WebformState; }>; export type TActionEditDataSource = PayloadAction<{ path: string; datasourceId: string; namespace?: string; propertyKey: string; value: any; }>; export type TActionRemoveDataSource = PayloadAction<{ path: string; datasourceID: string; }>; export type TActionSetDataSources = PayloadAction<{ datasourceArr: datasources.ICreateDataSource[]; path: string; }>; export type TActionRenameDataSource = { /** * id of datasource to be renamed */ datasourceId: string; /** * new datasource id */ value: string; /** * datasource namespace */ datasourceNamespace: datasources.ICreateDataSource['namespace']; /** * option to auto update the references in `components`. */ autoUpdateReferences: boolean; /** * @optional path of the webform. by default, it's the current webform. */ path?: string; }; export declare enum ETooltipBehavior { SHOW_AFTER_TIMEOUT = "show_after_timeout", HIDE_AFTER_TIMEOUT = "hide_after_timeout" } export declare enum EUnsavedPopOverChoice { NONE = "none", SAVE_ALL_AND_PROCEED = "saved_all_and_proceed", PROCEED = "proceed" } export declare enum EDisplayMode { AIRY = "airy", COMPACT = "neutral" } export type ClassFileTypes = 'entity' | 'collection' | 'dataclass' | 'model';