'use client';

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

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

export const PromptGeneratorNode = memo(({ id, data, selected, dragging }: NodeProps<PromptGeneratorNodeType>) => {
    return (
        <BaseNode
            id={id}
            data={data}
            selected={selected}
            dragging={dragging}
            icon={Sparkles}
            color="text-fuchsia-400"
            border="border-fuchsia-500/30"
            ring="ring-fuchsia-500/50"
            shadow="shadow-[0_0_40px_-10px_rgba(232,121,249,0.3)]"
            renderer={PromptGeneratorRenderer}
        />
    );
});

PromptGeneratorNode.displayName = 'PromptGeneratorNode';
