import { __, _x, sprintf } from '@wordpress/i18n';

export const blockI18n = {
    startAnalysis: __('Start Analysis', 'xhtheme-ai-toolbox'),
    reanalyzeWithAI: __('Reanalyze with AI', 'xhtheme-ai-toolbox'),
    aiIntelligentCompletion: __('AI Intelligent Completion', 'xhtheme-ai-toolbox'),
    articleSummary: __('Article Summary:', 'xhtheme-ai-toolbox'),
    tagLabels: __('TAG Labels:', 'xhtheme-ai-toolbox'),
    newTag: __('New', 'xhtheme-ai-toolbox'),
    existingTag: __('Existing', 'xhtheme-ai-toolbox'),
    tagAlias: __('Tag Alias', 'xhtheme-ai-toolbox'),
    seoTitle: __('SEO Title', 'xhtheme-ai-toolbox'),
    tagDescription: __('Tag Description', 'xhtheme-ai-toolbox'),
    aiOneClickApply: __('AI One-click Apply', 'xhtheme-ai-toolbox'),
    returnToReanalyze: __('Return to Reanalyze', 'xhtheme-ai-toolbox'),
    processingPleaseWait: __('Processing, please wait...', 'xhtheme-ai-toolbox'),
    processComplete: __('Process complete, returning to article panel...', 'xhtheme-ai-toolbox'),
    analyzingPleaseWait: __('Analyzing, please wait...', 'xhtheme-ai-toolbox'),
    model: __('Model:', 'xhtheme-ai-toolbox'),
    clickToSwitchModel: __('Click to switch model', 'xhtheme-ai-toolbox'),
    wordCountMessage: (count) => sprintf(
        __('Current article word count: %d words, AI intelligent completion feature can be used for articles over 300 words to automatically complete content such as TAG labels and summaries based on backend configuration!', 'xhtheme-ai-toolbox'),
        count
    ),
    error20001: __('[error:20001]Request error, please try again later!', 'xhtheme-ai-toolbox'),
    unknownError: __('Unknown error', 'xhtheme-ai-toolbox'),
    systemConfigError: __('System configuration error: API configuration missing', 'xhtheme-ai-toolbox'),
    enterContentFirst: __('Please enter content first', 'xhtheme-ai-toolbox'),
    serverResponseError: __('Server response error', 'xhtheme-ai-toolbox'),
    requestError: __('[error:20001]Request error, please try again later!', 'xhtheme-ai-toolbox'),
    contentAutoRecover: __('[Content will auto-recover in 2 seconds]', 'xhtheme-ai-toolbox'),
    requestTerminated: __('Request manually terminated by user!', 'xhtheme-ai-toolbox'),
    loading: __('Loading...', 'xhtheme-ai-toolbox'),
    stopOutput: __('Stop output', 'xhtheme-ai-toolbox'),
    startAI: __('Start AI', 'xhtheme-ai-toolbox'),
    paragraphOptimization: __('Paragraph content optimization', 'xhtheme-ai-toolbox'),
    writeBasedOnContent: __('Write based on content', 'xhtheme-ai-toolbox'),
    undoContent: __('Undo content', 'xhtheme-ai-toolbox'),
    modelLabel: __('Model: %s', 'xhtheme-ai-toolbox'),
    autoModel: __('Auto', 'xhtheme-ai-toolbox'),
    aiResponse: __('AI response', 'xhtheme-ai-toolbox'),
    aiResponseTitle: __('AI response:', 'xhtheme-ai-toolbox'),

    // ... existing keys ...
    requestTimeout: __('Request timeout, please try again later or switch to a different model!', 'xhtheme-ai-toolbox'),
    noValidTagData: __('No valid tag data received!', 'xhtheme-ai-toolbox'),
    noValidCommentData: __('No valid comment data received!', 'xhtheme-ai-toolbox'),
    noValidMetadata: __('No valid metadata received!', 'xhtheme-ai-toolbox'),
    selectOneItem: __('Please select at least one item to generate', 'xhtheme-ai-toolbox'),
    analysisFailed: __('AI analysis failed: %s', 'xhtheme-ai-toolbox'),
    updateFailed: __('Information update failed!', 'xhtheme-ai-toolbox'),
    aiSmartCompletion: __('AI Smart Completion', 'xhtheme-ai-toolbox'),
    aiGeneratedWarning: __('The following content is generated by AI models, please review carefully!', 'xhtheme-ai-toolbox'),
    completed: __('Completed', 'xhtheme-ai-toolbox'),
    retry: __('Retry', 'xhtheme-ai-toolbox'),
    generationFailed: __('Generation failed', 'xhtheme-ai-toolbox'),
    newTag: __('New', 'xhtheme-ai-toolbox'),
    existingTag: __('Existing', 'xhtheme-ai-toolbox'),
    tagSlug: __('Tag Slug', 'xhtheme-ai-toolbox'),
    seoTitle: __('SEO Title', 'xhtheme-ai-toolbox'),
    tagDescription: __('Tag Description', 'xhtheme-ai-toolbox'),
    noTagsExtracted: __('No tags extracted, please try switching to a different model!', 'xhtheme-ai-toolbox'),
    anonymousUser: __('Anonymous User', 'xhtheme-ai-toolbox'),
    immediatePublish: __('Immediate Publish', 'xhtheme-ai-toolbox'),
    noCommentContent: __('No comment content!', 'xhtheme-ai-toolbox'),
    commentsFailed: __('Failed to generate comments, please try switching to a different model!', 'xhtheme-ai-toolbox'),
    postSlug: __('Post Slug', 'xhtheme-ai-toolbox'),
    slugHelp: __('Slug used in the post URL', 'xhtheme-ai-toolbox'),
    postCategory: __('Post Category', 'xhtheme-ai-toolbox'),
    selectCategory: __('Please select a category...', 'xhtheme-ai-toolbox'),
    categoryHelp: __('Select the category for this post', 'xhtheme-ai-toolbox'),
    processingComplete: __('Processing complete, returning to post panel...', 'xhtheme-ai-toolbox'),
    applyAI: __('Apply AI with One Click', 'xhtheme-ai-toolbox'),
    reanalyze: __('Return to Reanalyze', 'xhtheme-ai-toolbox'),
    wordCountMessage: (wordNumber) => sprintf(
        __('Current article word count: %d words. AI Smart Completion is available for articles with more than 300 words!', 'xhtheme-ai-toolbox'),
        wordNumber
    ),
    completionItems: __('Completion Items:', 'xhtheme-ai-toolbox'),
    selectModel: __('Select Model:', 'xhtheme-ai-toolbox'),
    clickToSwitchModel: __('Click to switch model', 'xhtheme-ai-toolbox'),
    commentsGenerationInfo: __('AI will generate %d comments, %d will be generated immediately, the remaining %d will be scheduled for publishing!', 'xhtheme-ai-toolbox'),
    simpleCommentsGenerationInfo: __('AI will generate %d comments!', 'xhtheme-ai-toolbox'),
    excerpt: __('Excerpt', 'xhtheme-ai-toolbox'),
    metadata: __('Metadata', 'xhtheme-ai-toolbox'),
    startAnalysis: __('Start Analysis', 'xhtheme-ai-toolbox')
};