(function () { var s = document.createElement("script"); s.src = "' . esc_js( $embed_base ) . '/embed/agent-widget.js?v=" + Date.now(); s.setAttribute("data-pid", "' . esc_js( $project_id ) . '"); s.setAttribute("data-cid", "' . esc_js( $chatbot_id ) . '"); document.body.appendChild(s); })(); '; $embed_iframe_code = ''; // Default active tab. $valid_tabs = array( 'aic-agent-panel-stats', 'aic-agent-panel-appearance', 'aic-agent-panel-ai', 'aic-agent-panel-kb', 'aic-agent-panel-conversations', 'aic-agent-panel-embed', 'aic-agent-panel-widget-tabs', 'aic-agent-panel-woocommerce', 'aic-agent-panel-advanced', ); if ( ! in_array( $active_tab, $valid_tabs, true ) ) { $active_tab = 'aic-agent-panel-stats'; } ?>

array( 'label' => __( 'Stats', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-appearance' => array( 'label' => __( 'Playground', AI_CHATBOT_DOMAIN ), 'icon' => '', ), // Note: Playground is embedded inside the Appearance tab as a split view (no separate tab). 'aic-agent-panel-ai' => array( 'label' => __( 'AI Settings', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-kb' => array( 'label' => __( 'Knowledge Base', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-conversations' => array( 'label' => __( 'Conversations', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-embed' => array( 'label' => __( 'Embed', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-widget-tabs' => array( 'label' => __( 'Widget Tabs', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-woocommerce' => array( 'label' => __( 'WooCommerce', AI_CHATBOT_DOMAIN ), 'icon' => '', ), 'aic-agent-panel-advanced' => array( 'label' => __( 'AI Credits', AI_CHATBOT_DOMAIN ), 'icon' => '', ), ); foreach ( $tabs as $panel_id => $tab ) { $is_active = ( $active_tab === $panel_id ); $extra_cls = $is_active ? ' active' : ''; $aria = $is_active ? 'true' : 'false'; if ( 'aic-agent-panel-advanced' === $panel_id ) { // No special class for Advanced tab. } echo ''; } ?>

' . esc_html__( 'our dashboard', AI_CHATBOT_DOMAIN ) . '' ); ?>