title: Chatbot Standalone
label: Chatbot Standalone
status: live
preview: '@preview'
context:
  component-type: container
  hide-from-sitemenu: true
variants:
  - name: default
    context:
      config:
        # Basic Configuration
        type: "standalone"
        title: "AI Assistant"
        welcome_logo: true
        welcome_message: "Welcome! I'm here to help"
        welcome_logo_alt: "AI Assistant"
        welcome_suggestions_title: "Try asking me:"
        input_placeholder: "Ask me ..."
        welcome_max_suggestions: 4
        # Icons and Images (all customizable)
        icons:
          assistant_avatar: "../../assets/vf-chatbot/assets/vf-chatbot--icon-16x16-dark-green.svg"
          user_avatar: "../../assets/vf-chatbot/assets/vf-chatbot--avatar-user.svg"
          send_button: "../../assets/vf-chatbot/assets/vf-chatbot--icon-send.svg"
          main_logo_url: "../../assets/vf-chatbot/assets/vf-chatbot--icon-32x32-dark-green.svg"

        # API Configuration
        api:
          chat_endpoint: "/api/chat"
          feedback_endpoint: "/api/feedback"
          qa_data_url: "../../assets/vf-chatbot/assets/vf-chatbot-qa.json"
          headers:
            "Content-Type": "application/json"
            "Authorization": "Bearer your-token"
          timeout: 10000

        # Feature Toggles
        features:
          enable_welcome: true
          enable_feedback: true
          enable_sources: true
          enable_sources_custom_format: true
          enable_welcome_suggestions: true
          enable_typing_indicator: true
          enable_disclaimer: true
          enable_predefined_qa: true
          enable_fallback_responses: true
          enable_qa_data_loading: true
          enable_instant_feedback: false

        # Behavior Configuration
        behavior:
          auto_scroll: true
          typing_delay: 800
          show_scrollbar: false

        selectorContext:
          chatbotRoutes:
            multiSelect: true
            maxMultiSelect: 3
            showSearch: true
            showSearchThreshold: 5
            showAllServices: true
            showAllServicesSelected: true
            routes: "../../assets/vf-chatbot/assets/vf-chatbot-selector-services.json"
            placeholder: "Select services"
            title: "Services"
            selector_logo_url: "../../assets/vf-chatbot/assets/vf-chatbot--icon-24x24-dark-green.svg"
            selector_logo_title: "AI Assistant"

        # Custom Event Handlers (function names)
        handlers:
          on_message_send: "handleMessageSend"
          on_response_receive: "handleResponseReceive"
          on_feedback_submit: "handleFeedbackSubmit"
          on_suggestion_click: "handleSuggestionClick"
          on_error: "handleError"
          on_conversation_start: "handleConversationStart"
          on_conversation_end: "handleConversationEnd"

        # Legacy support
        disclaimer: 'Disclaimer: This chatbot is designed to assist you with general information and basic inquiries. See our <a class="vf-banner__link" target="_blank" rel="noopener noreferrer" aria-label="disclaimer notes (opens in new tab)" href="https://www.ebi.ac.uk/data-protection/privacy-notice/embl-ebi-public-website/">disclaimer notes</a>.'
        footnote: 'Review AI generated content for accuracy. <a class="vf-link" target="_blank" rel="noopener noreferrer" aria-label="Leave feedback (opens in new tab)" href="https://embl.service-now.com/esc?id=sc_cat_item&sys_id=5eeb8eb91b92e650b376da88b04bcbc1">Leave feedback</a>.'
      react: <VFChatbot config={chatbotConfig} />
