<?php

use OtomaticAi\Controllers\AnalyseLogsController;
use OtomaticAi\Controllers\AnnouncementController;
use OtomaticAi\Controllers\AuthController;
use OtomaticAi\Controllers\DashboardController;
use OtomaticAi\Controllers\GenerateRequestController;
use OtomaticAi\Controllers\GenerateTitlesController;
use OtomaticAi\Controllers\ImageGeneratorController;
use OtomaticAi\Controllers\KeywordController;
use OtomaticAi\Controllers\PersonaController;
use OtomaticAi\Controllers\ProjectController;
use OtomaticAi\Controllers\PublicationController;
use OtomaticAi\Controllers\RewriteRequestController;
use OtomaticAi\Controllers\Settings\ApiController;
use OtomaticAi\Controllers\Linking\AutomaticPagesController;
use OtomaticAi\Controllers\Linking\AutomaticPostsController;
use OtomaticAi\Controllers\Linking\ManualController;
use OtomaticAi\Controllers\NewsBannerController;
use OtomaticAi\Controllers\OneClick\CategoriesController;
use OtomaticAi\Controllers\OneClick\ChatController;
use OtomaticAi\Controllers\OneClick\ProfilesController;
use OtomaticAi\Controllers\OneClick\ProjectsController;
use OtomaticAi\Controllers\OneClickController;
use OtomaticAi\Controllers\PricingPlanController;
use OtomaticAi\Controllers\Settings\AmazonController;
use OtomaticAi\Controllers\Settings\GlobalSystemsController;
use OtomaticAi\Controllers\SingleMode\GenerateBriefController;
use OtomaticAi\Controllers\SingleMode\GenerateKeywordsController;
use OtomaticAi\Controllers\SingleMode\GenerateProfileCustomInstructionsController;
use OtomaticAi\Controllers\SingleMode\KeywordsSourceController;
use OtomaticAi\Controllers\SingleMode\MediaController;
use OtomaticAi\Controllers\SingleMode\NewsSourceController;
use OtomaticAi\Controllers\SingleMode\PublishController;
use OtomaticAi\Controllers\SingleMode\RewriteTitleController;
use OtomaticAi\Controllers\SingleMode\RssSourceController;
use OtomaticAi\Controllers\SingleMode\SeoController;
use OtomaticAi\Controllers\SingleMode\SingleModeController;
use OtomaticAi\Controllers\SingleMode\SitemapSourceController;
use OtomaticAi\Controllers\SingleMode\TemplateController as SingleModeTemplateController;
use OtomaticAi\Controllers\SingleMode\UrlSourceController;
use OtomaticAi\Controllers\TemplateController;
use OtomaticAi\Controllers\TextBlocksController;
use OtomaticAi\Controllers\UsageController;
use OtomaticAi\Controllers\VideoController;
use OtomaticAi\Controllers\WordpressController;
use OtomaticAi\Utils\Route;

// auth
Route::ajax("auth_login", AuthController::class, 'login');
Route::ajax("auth_logout", AuthController::class, 'logout');
Route::ajax("auth_domain", AuthController::class, 'domain');
Route::ajax("auth_user", AuthController::class, 'user');
Route::ajax("auth_required_settings", AuthController::class, 'requiredSettings');
Route::ajax("auth_enable_premium", AuthController::class, 'enablePremium');
Route::ajax("auth_disable_premium", AuthController::class, 'disablePremium');
Route::ajax("auth_oauth_authorize", AuthController::class, 'oauthAuthorize');
Route::ajax("auth_oauth_complete", AuthController::class, 'oauthComplete');

// wordpress
Route::ajax("wordpress_users", WordpressController::class, 'users');
Route::ajax("wordpress_templates", WordpressController::class, 'templates');
Route::ajax("wordpress_statuses", WordpressController::class, 'statuses');
Route::ajax("wordpress_categories", WordpressController::class, 'categories');
Route::ajax("wordpress_tags", WordpressController::class, 'tags');
Route::ajax("wordpress_user_roles", WordpressController::class, 'userRoles');
Route::ajax("wordpress_post_types", WordpressController::class, 'postTypes');

// personas
Route::ajax("personas_index", PersonaController::class, 'index');
Route::ajax("personas_latest", PersonaController::class, 'latest');
Route::ajax("personas_store", PersonaController::class, 'store');
Route::ajax("personas_edit", PersonaController::class, 'edit');
Route::ajax("personas_destroy", PersonaController::class, 'destroy');
Route::ajax("personas_update_profil", PersonaController::class, 'updateProfil');
Route::ajax("personas_update_avatar", PersonaController::class, 'updateAvatar');
Route::ajax("personas_validate_language_step", PersonaController::class, 'validateLanguageStep');
Route::ajax("personas_validate_user_step", PersonaController::class, 'validateUserStep');
Route::ajax("personas_validate_profil_step", PersonaController::class, 'validateProfilStep');
Route::ajax("personas_generate_biography", PersonaController::class, 'generateBiography');
Route::ajax("personas_validate_biography_step", PersonaController::class, 'validateBiographyStep');
Route::ajax("personas_generate_avatar", PersonaController::class, 'generateAvatar');

// projects
Route::ajax("projects_index", ProjectController::class, 'index');
Route::ajax("projects_latest", ProjectController::class, 'latest');
Route::ajax("projects_show", ProjectController::class, 'show');
Route::ajax("projects_enable", ProjectController::class, 'enable');
Route::ajax("projects_disable", ProjectController::class, 'disable');
Route::ajax("projects_destroy", ProjectController::class, 'destroy');
Route::ajax("projects_store", ProjectController::class, 'store');
Route::ajax("projects_update", ProjectController::class, 'update');
Route::ajax("project_validate_requests_keyword_step", ProjectController::class, 'validateRequestsKeywordStep');
Route::ajax("project_validate_requests_step", ProjectController::class, 'validateRequestsStep');
Route::ajax("project_validate_content_step", ProjectController::class, 'validateContentStep');
Route::ajax("project_validate_planning_step", ProjectController::class, 'validatePlanningStep');
Route::ajax("project_rewrite_custom_instructions", ProjectController::class, 'rewriteCustomInstructions');

// titles
Route::ajax("titles_generate", GenerateTitlesController::class, "generateTitles");
Route::ajax("titles_generate_siloing", GenerateTitlesController::class, "generateSiloingTitles");
Route::ajax("titles_generate_haloscan", GenerateTitlesController::class, "generateHaloscanTitles");
Route::ajax("titles_generate_keywords", GenerateTitlesController::class, "generateKeywordsTitles");

// requests
Route::ajax("requests_generate", GenerateRequestController::class);
Route::ajax("requests_rewrite", RewriteRequestController::class);
Route::ajax("requests_get_posts", GenerateRequestController::class, "getPosts");

// keywords
Route::ajax("keywords_generate", KeywordController::class, 'generate');
Route::ajax("keywords_analyse", KeywordController::class, 'analyse');

// publications
Route::ajax("publications_index", PublicationController::class, 'index');
Route::ajax("publications_latest_published", PublicationController::class, 'latestPublished');
Route::ajax("publications_next_published", PublicationController::class, 'nextPublished');
Route::ajax("publications_store", PublicationController::class, 'store');
Route::ajax("publications_bulk_replanifying", PublicationController::class, 'bulkReplanifying');
Route::ajax("publications_bulk_regenerate_thumbnail", PublicationController::class, 'bulkRegenerateThumbnail');
Route::ajax("publications_publish", PublicationController::class, 'publish');
Route::ajax("publications_retry", PublicationController::class, 'retry');
Route::ajax("publications_regenerate", PublicationController::class, 'regenerate');
Route::ajax("publications_bulk_regenerate", PublicationController::class, 'bulkRegenerate');
Route::ajax("publications_bulk_publish", PublicationController::class, 'bulkPublish');
Route::ajax("publications_bulk_copy_urls", PublicationController::class, 'bulkCopyUrls');
Route::ajax("publications_destroy", PublicationController::class, 'destroy');
Route::ajax("publications_bulk_destroy", PublicationController::class, 'bulkDestroy');

// settings api
Route::ajax("settings_api_index", ApiController::class, 'index');
Route::ajax("settings_api_validate_openai", ApiController::class, 'validateOpenAI');
Route::ajax("settings_api_update_openai", ApiController::class, 'updateOpenAI');
Route::ajax("settings_api_update_mistral_ai", ApiController::class, 'updateMistralAi');
Route::ajax("settings_api_update_x_ai", ApiController::class, 'updateXAi');
Route::ajax("settings_api_update_groq", ApiController::class, 'updateGroq');
Route::ajax("settings_api_update_anthropic", ApiController::class, 'updateAnthropic');
Route::ajax("settings_api_update_stability_ai", ApiController::class, 'updateStabilityAI');
Route::ajax("settings_api_update_ideogram", ApiController::class, 'updateIdeogram');
Route::ajax("settings_api_update_flux", ApiController::class, 'updateFlux');
Route::ajax("settings_api_update_unsplash", ApiController::class, 'updateUnsplash');
Route::ajax("settings_api_update_pexels", ApiController::class, 'updatePexels');
Route::ajax("settings_api_update_pixabay", ApiController::class, 'updatePixabay');
Route::ajax("settings_api_update_haloscan", ApiController::class, 'updateHaloscan');
Route::ajax("settings_api_update_deepseek", ApiController::class, 'updateDeepSeek');
Route::ajax("settings_api_update_gemini", ApiController::class, 'updateGemini');

// settings global systems
Route::ajax("settings_global_systems_index", GlobalSystemsController::class, 'index');
Route::ajax("settings_global_systems_update", GlobalSystemsController::class, 'update');

// settings amazon
Route::ajax("settings_amazon_index", AmazonController::class, 'index');
Route::ajax("settings_amazon_update", AmazonController::class, 'update');

// linking
Route::ajax("linking_automatic_posts_index", AutomaticPostsController::class, 'index');
Route::ajax("linking_automatic_posts_update_settings", AutomaticPostsController::class, 'updateSettings');
Route::ajax("linking_automatic_posts_update_template", AutomaticPostsController::class, 'updateTemplate');
Route::ajax("linking_automatic_pages_index", AutomaticPagesController::class, 'index');
Route::ajax("linking_automatic_pages_update_settings", AutomaticPagesController::class, 'updateSettings');
Route::ajax("linking_automatic_pages_update_template", AutomaticPagesController::class, 'updateTemplate');
Route::ajax("linking_manual_index", ManualController::class, 'index');
Route::ajax("linking_manual_store", ManualController::class, 'store');
Route::ajax("linking_manual_update", ManualController::class, 'update');
Route::ajax("linking_manual_destroy", ManualController::class, 'destroy');
Route::ajax("linking_manual_generate_keywords", ManualController::class, 'generateKeywords');
Route::ajax("linking_manual_search_posts", ManualController::class, 'searchPosts');

// templates
Route::ajax("templates_index", TemplateController::class, 'index');
Route::ajax("templates_store", TemplateController::class, 'store');
Route::ajax("templates_destroy", TemplateController::class, 'destroy');
Route::ajax("templates_export", TemplateController::class, 'export');
Route::ajax("templates_import", TemplateController::class, 'import');

// text blocks
Route::ajax("text_blocks_index", TextBlocksController::class, 'index');
Route::ajax("text_blocks_generate_prompt", TextBlocksController::class, 'generatePrompt');

// news banner
Route::ajax("news_banners_index", NewsBannerController::class);

// announcements
Route::ajax("announcements_index", AnnouncementController::class);

// news banner
Route::ajax("videos_index", VideoController::class);

// dashboard
Route::ajax("dashboard_usages", UsageController::class);
Route::ajax("dashboard_latest_publications", DashboardController::class, 'latestPublications');
Route::ajax("dashboard_next_publications", DashboardController::class, 'nextPublications');
Route::ajax("dashboard_global_metrics", DashboardController::class, 'globalMetrics');

// pricing plans
Route::ajax("pricing_plans_index", PricingPlanController::class);

// image generator
Route::ajax("image_generator_generate", ImageGeneratorController::class, 'generate');
Route::ajax("image_generator_generate_description", ImageGeneratorController::class, 'generateDescription');
Route::ajax("image_generator_save", ImageGeneratorController::class, 'save');

// single mode
Route::ajax("single_mode_index", SingleModeController::class, 'index');
Route::ajax("single_mode_latest", SingleModeController::class, 'latest');
Route::ajax("single_mode_show", SingleModeController::class, 'show');
Route::ajax("single_mode_store", SingleModeController::class, 'store');
Route::ajax("single_mode_destroy", SingleModeController::class, 'destroy');
Route::ajax("single_mode_update", SingleModeController::class, 'update');
Route::ajax("single_mode_publish", PublishController::class);
Route::ajax("single_mode_rss_source_search", RssSourceController::class, 'search');
Route::ajax("single_mode_news_source_search", NewsSourceController::class, 'search');
Route::ajax("single_mode_sitemap_source_search", SitemapSourceController::class, 'search');
Route::ajax("single_mode_url_source_search", UrlSourceController::class, 'search');
Route::ajax("single_mode_keywords_source_search", KeywordsSourceController::class, 'search');
Route::ajax("single_mode_rewrite_title", RewriteTitleController::class);
Route::ajax("single_mode_generate_seo_title", SeoController::class, 'generateTitle');
Route::ajax("single_mode_generate_seo_description", SeoController::class, 'generateDescription');
Route::ajax("single_mode_generate_keywords", GenerateKeywordsController::class);
Route::ajax("single_mode_generate_brief", GenerateBriefController::class);
Route::ajax("single_mode_generate_profile_custom_instructions", GenerateProfileCustomInstructionsController::class);
Route::ajax("single_mode_regenerate_image", MediaController::class, 'regenerateImage');
Route::ajax("single_mode_update_image_prompt", MediaController::class, 'updateImagePrompt');
Route::ajax("single_mode_save_template", SingleModeTemplateController::class, 'store');

// one click
Route::ajax("one_click_chat", ChatController::class, 'chat');
Route::ajax("one_click_rewrite_prompt", ChatController::class, 'rewritePrompt');
Route::ajax("one_click_create_categories", CategoriesController::class, 'createCategories');
Route::ajax("one_click_create_profile", ProfilesController::class, 'createProfile');
Route::ajax("one_click_create_project", ProjectsController::class, 'createProject');


// others
Route::ajax("analyse_logs", AnalyseLogsController::class);
