/**
 * Approval node config
 */

import React from 'react';
import type { NodeConfigRendererProps } from './types';

export const ApprovalNodeConfig: React.FC<NodeConfigRendererProps> = ({ params, updateParam }) => (
  <>
    <div>
      <label>Titel</label>
      <input
        value={(params.title as string) ?? ''}
        onChange={(e) => updateParam('title', e.target.value)}
        placeholder="Genehmigungstitel"
      />
    </div>
    <div>
      <label>Beschreibung</label>
      <textarea
        value={(params.description as string) ?? ''}
        onChange={(e) => updateParam('description', e.target.value)}
        placeholder="Was genehmigt werden soll"
      />
    </div>
  </>
);
