import {
    type TextInputProps,
    type StyleProp,
    type ViewStyle
} from "react-native";

export type CodeEditorSpreadBehaviour = "baseline" | "stretch" | "free";

export interface ICodeEditorDynamicStyleProps {
    typography: NCoreUIKit.ActivePalette["typography"];
    radiuses: NCoreUIKit.ActivePalette["radiuses"];
    borders: NCoreUIKit.ActivePalette["borders"];
    spreadBehaviour?: CodeEditorSpreadBehaviour;
    spaces: NCoreUIKit.ActivePalette["spaces"];
    colors: NCoreUIKit.ActivePalette["colors"];
    isLineNumberVisible?: boolean;
    isToolbarVisible?: boolean;
    hasLanguage?: boolean;
}

import type ISystemToolbarProps from "../systemToolbar/type";

interface ICodeEditorProps extends Omit<TextInputProps, "style" | "value" | "onChangeText"> {
    toolbarContainerStyle?: StyleProp<ViewStyle>;
    toolbarActions?: Array<ISystemToolbarProps>;
    spreadBehaviour?: CodeEditorSpreadBehaviour;
    onChangeText?: (text: string) => void;
    isLineNumberVisible?: boolean;
    isToolbarVisible?: boolean;
    containerStyle?: ViewStyle;
    isScrollable?: boolean;
    style?: ViewStyle;
    language?: string;
    value: string;
}

export type {
    ICodeEditorProps as default
};
