import type { Schema } from '@cfworker/json-schema'; import type { IIntegraionValidationOption, IIntegrationProtocolOption } from '../../../useOptions.js'; import { type Ref } from '#imports'; export declare const ViewStateProps: { src: { type: StringConstructor; requird: boolean; }; path: { type: (StringConstructor | NumberConstructor)[]; }; schemaSrc: { type: StringConstructor; }; data: { type: (StringConstructor | NumberConstructor | ArrayConstructor | ObjectConstructor)[]; requird: boolean; }; }; export interface IViewStateProps { src?: string; path?: string | number; schemaSrc?: string; data?: object | any[] | string | number; } export interface IViewStateResult { data: Ref; update: (value: unknown) => void; set: (key: string, value: unknown) => void; status: Ref; reload?: (force?: boolean) => Promise; syncResult?: Ref; syncStatus?: Ref; validate: () => void; validationResult: Ref; pause: () => void; } export interface IViewStateSourceProps { src: string; key: string; option: IIntegrationProtocolOption; type: string; path?: string | number; default?: unknown; validationOptions?: IIntegraionValidationOption; url: string; stateKey: string; updateStateKey: string; fetchedStateKey: string; statusStateKey: string; srcPath: string[]; lazy: boolean; server: boolean; immediate: boolean; interval: number; headers?: Record; } export interface IViewStateSourceResult { model: Ref; updated: Ref; reload?: (force?: boolean) => Promise; status: Ref; sync?: () => Promise; syncResult?: Ref; syncStatus?: Ref; } export type ViewStateNuxtHelper = () => IViewStateHelperResult; export interface IViewStateHelperResult { data: Ref; status: Ref; } export interface IViewStateValidateResult { valid: boolean; location: Record; summury: IViewStateValidateResultSummury; schema: Schema; } export interface IViewStateValidateResultSummury { errors: string[]; keywords: string[]; } export declare function useViewState

(props: P, schema?: unknown): Promise;