import type * as React from "react";
import type {HostComponent, ViewProps} from "react-native";
import codegenNativeCommands from "react-native/Libraries/Utilities/codegenNativeCommands";
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
import type {Int32, UnsafeObject} from "react-native/Libraries/Types/CodegenTypes";

export interface ImageEditorViewNativeProps extends ViewProps {
}

type NativeType = HostComponent<ImageEditorViewNativeProps>;

interface NativeCommands {
    setQuads(viewRef: React.ElementRef<NativeType>, quads: Array<UnsafeObject>, layerId: Int32): void;
}

export const Commands = codegenNativeCommands<NativeCommands>({
    supportedCommands: ["setQuads"]
});

export default codegenNativeComponent<ImageEditorViewNativeProps>(
    "DynamsoftImageEditorView"
) as HostComponent<ImageEditorViewNativeProps>;
