import React from 'react';
import { AutocompleteRequest } from '../../utils/api';
import SearchInputForm, { SearchType } from '../../components/SearchInputForm';

interface UrlInputContentProps {
  onAnalyze: (value: string, type?: SearchType) => void;
  onAutocomplete?: (data: AutocompleteRequest) => void;
  onManualInput?: (businessName: string, address: string) => void;
  error: string | null;
}

const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomplete, onManualInput, error }) => {
  return (
    <div className="url-input-container">
      <div className="url-input-content">
        <div className="url-input-logo">
          <img src="/assets/images/ADO2_with Slogan_white.svg" alt="ADO2" />
        </div>

        <SearchInputForm
          onAnalyze={onAnalyze}
          onAutocomplete={onAutocomplete}
          onManualInput={onManualInput}
          error={error}
        />
      </div>
    </div>
  );
};

export default UrlInputContent;
