'use client';

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

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

export const AudioGeneratorNode = memo(({ id, data, selected, dragging }: NodeProps<AudioGeneratorNodeType>) => {
    return (
        <BaseNode
            id={id}
            data={data}
            selected={selected}
            dragging={dragging}
            icon={Mic2}
            color="text-pink-400"
            border="border-pink-500/30"
            ring="ring-pink-500/50"
            shadow="shadow-[0_0_40px_-10px_rgba(244,114,182,0.3)]"
            renderer={AudioGeneratorRenderer}
        />
    );
});

AudioGeneratorNode.displayName = 'AudioGeneratorNode';
