'use client';

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

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

export const ImageEditorNode = memo(({ id, data, selected, dragging }: NodeProps<ImageEditorNodeType>) => {
    return (
        <BaseNode
            id={id}
            data={data}
            selected={selected}
            dragging={dragging}
            icon={Edit}
            color="text-rose-400"
            border="border-rose-500/30"
            ring="ring-rose-500/50"
            shadow="shadow-[0_0_40px_-10px_rgba(251,113,133,0.3)]"
            renderer={MediaDisplayRenderer}
        />
    );
});

ImageEditorNode.displayName = 'ImageEditorNode';
