'use client';

import React, { memo } from 'react';
import { Image as ImageIcon } from 'lucide-react';
import { NodeProps, Node } from '@xyflow/react';
import { AppNodeData } from '../../types/node';
import { BaseNode } from '../BaseNode';
import { MediaDisplayRenderer } from '../renderers/MediaDisplayRenderer';

type ImageGeneratorNodeType = Node<AppNodeData, 'appNode'>;

export const ImageGeneratorNode = memo(({ id, data, selected, dragging }: NodeProps<ImageGeneratorNodeType>) => {
    return (
        <BaseNode
            id={id}
            data={data}
            selected={selected}
            dragging={dragging}
            icon={ImageIcon}
            color="text-cyan-400"
            border="border-cyan-500/30"
            ring="ring-cyan-500/50"
            shadow="shadow-[0_0_40px_-10px_rgba(34,211,238,0.3)]"
            renderer={MediaDisplayRenderer}
        />
    );
});

ImageGeneratorNode.displayName = 'ImageGeneratorNode';
