import { ComponentProps, ReactNode, ReactElement } from 'react';
import { ImageProps } from 'next/image';
import { LinkProps } from 'next/link';
import { ReactPlayerProps } from 'react-player';

interface IVideo {
    src: string;
    placeholder: string;
}
type ILink = LinkProps & Pick<ComponentProps<'a'>, 'target' | 'rel' | 'title' | 'className' | 'style'> & {
    children: ReactNode;
    newWindow?: boolean;
};
interface IFeatureListProps {
    className?: string;
    title?: string;
    description?: string;
    items: {
        title: string;
        description: string;
        image: ImageProps;
        link?: ILink;
    }[];
    link?: ILink;
}
interface IInfoListProps {
    className?: string;
    title?: string | ReactNode;
    items: {
        title: string | ReactNode;
        description: string | ReactNode;
        link?: ILink;
    }[];
}
interface IHeroVideoProps {
    className?: string;
    title: string | ReactNode;
    description: string | ReactNode;
    flipped?: boolean;
    link?: ILink;
    video: IVideo;
    videoProps?: ReactPlayerProps;
}
interface IHeroIllustrationProps {
    className?: string;
    title: string | ReactNode;
    description: string | ReactNode;
    flipped?: boolean;
    link?: ILink;
    image: ImageProps;
}
interface IHeroGradientProps {
    className?: string;
    title: string | ReactNode;
    description: string | ReactNode;
    colors?: string[];
    version?: string | ReactNode;
    link?: ILink | ILink[];
    image?: ImageProps;
}
interface IHeroMarketplaceProps {
    className?: string;
    title: string | ReactNode;
    description: string | ReactNode;
    link: ILink;
    image?: ImageProps;
}
interface IMarketplaceItemProps {
    title: string;
    description: string | ReactNode;
    tags?: string[];
    modal?: {
        header: {
            image?: ImageProps;
            description?: string | ILink;
        };
        content: string | (() => ReactNode) | ReactNode;
    };
    update: string;
    image: ImageProps;
    link: Omit<ILink, 'children'>;
    weeklyNPMDownloads?: number;
}
interface IMarketplaceItemsProps {
    items: IMarketplaceItemProps[];
}
interface IMarketplaceListProps {
    className?: string;
    title?: string;
    colorScheme?: 'green' | 'neutral';
    placeholder: string | ReactElement;
    pagination: number;
    items: IMarketplaceItemProps[];
}
interface IMarketplaceSearchProps {
    className?: string;
    title: string | ReactNode;
    placeholder: string;
    colorScheme?: 'green' | 'neutral';
    primaryList: IMarketplaceListProps;
    secondaryList?: IMarketplaceListProps;
    queryList?: IMarketplaceListProps;
    tagsFilter?: string[] | ReadonlyArray<string>;
}
interface ISchemaPageProps {
    schemaName: string;
    tags?: string[];
    editorData: Omit<IEditorProps, 'icon' | 'children'>[];
}
interface IEditorProps {
    children: ReactNode;
    title: string;
    frameworks?: string[];
    schema?: string;
    image?: string;
    operations?: string;
}

export type { IEditorProps, IFeatureListProps, IHeroGradientProps, IHeroIllustrationProps, IHeroMarketplaceProps, IHeroVideoProps, IInfoListProps, ILink, IMarketplaceItemProps, IMarketplaceItemsProps, IMarketplaceListProps, IMarketplaceSearchProps, ISchemaPageProps };
