__( 'Automation', 'shieldlume-security' ), 'pro-investigations' => __( 'Investigations & AI', 'shieldlume-security' ), 'pro-reports' => __( 'Reports', 'shieldlume-security' ), ); } public static function isTab( string $tab ): bool { return isset( self::tabs()[ $tab ] ); } public static function url( string $workflow ): string { $tab = array( 'scheduling' => 'pro-automation', 'batches' => 'pro-automation', 'investigations' => 'pro-investigations', 'ai' => 'pro-investigations', 'reports' => 'pro-reports' )[ $workflow ] ?? 'pro'; return Admin::url( $tab ) . ( 'ai' === $workflow ? '#avai-preview-ai' : ( 'batches' === $workflow ? '#avai-preview-recovery' : '' ) ); } public static function purchaseUrl(): string { return 'https://antivirus.ai/pricing/'; } public static function actionLabel(): string { return Journey::proInstalled() ? ( Journey::proUnlocked() ? __( 'Open this tool', 'shieldlume-security' ) : __( 'Activate your licence', 'shieldlume-security' ) ) : __( 'Get Pro', 'shieldlume-security' ); } /** The explicit button, not a preview view, records this administrator's task. */ public static function actionButton( string $workflow ): void { if ( ! current_user_can( 'manage_options' ) || is_multisite() ) { return; } if ( defined( 'ANTIVIRUS_AI_PRO_VERSION' ) && ! Journey::proInstalled() ) { echo '

' . esc_html__( 'Your installed Pro add-on needs a compatible Free/Pro pair before its tools can open.', 'shieldlume-security' ) . ' ' . esc_html__( 'Review plugin compatibility', 'shieldlume-security' ) . '

'; return; } $operation = Journey::proInstalled() ? 'remember' : 'upgrade'; echo '
'; wp_nonce_field( 'antivirus_ai_journey_' . $operation, '_avai_journey_nonce' ); submit_button( self::actionLabel(), 'primary', 'submit', false ); echo '
'; } public static function licenceCopy(): string { return __( 'Pro needs one successful online licence activation on this site before its local tools unlock. After that, earned local access continues offline and after subscription expiry. Optional AI and other connected services need their own permission, eligible access and an available service; online references still need a connection. Paid updates and downloads need current entitlement. Explicit local Disconnect removes the local unlock.', 'shieldlume-security' ); } public static function offer(): void { $offer = Product::offer(); echo '
' . esc_html( Product::priceLabel() ) . '

'; /* translators: %s: annual renewal price in US dollars. */ echo esc_html( sprintf( __( 'Renews at %s USD each year until cancelled. Applicable tax is additional.', 'shieldlume-security' ), '$' . number_format( $offer['renewal_amount_minor'] / 100, 2, '.', '' ) ) ); echo '

' . esc_html__( 'One production site + paired staging', 'shieldlume-security' ) . '

' . esc_html__( 'The staging installation must be explicitly paired with that production site.', 'shieldlume-security' ) . '

'; /* translators: 1: completed daily AI allowance, 2: completed monthly AI allowance. */ echo esc_html( sprintf( __( 'AI: %1$d completed/day · %2$d/month', 'shieldlume-security' ), $offer['ai_daily_limit'], $offer['ai_monthly_limit'] ) ); echo '

' . esc_html__( 'UTC limits, shared with paired staging. Failed attempts and saved-answer retrieval do not use this allowance; separate attempt limits apply.', 'shieldlume-security' ) . '

' . esc_html__( 'Installing a plugin does not start a subscription. Review the current offer and purchase terms before buying; your accepted account terms apply.', 'shieldlume-security' ) . '

'; echo '

' . esc_html( self::licenceCopy() ) . '

'; } private static function image( string $file, string $alt, string $caption ): void { $path = dirname( __DIR__ ) . '/assets/pro-examples/' . $file; $size = is_file( $path ) ? wp_getimagesize( $path ) : false; $url = plugins_url( 'assets/pro-examples/' . $file, ANTIVIRUS_AI_FILE ); echo '
' . esc_attr( $alt ) . '
' . esc_html__( 'Actual Pro 0.1.17 screen · light theme · fictional sample data', 'shieldlume-security' ) . ' ' . esc_html( $caption ) . '
'; } public static function render( string $tab ): void { $flow = 'pro-automation' === $tab ? 'scheduling' : ( 'pro-reports' === $tab ? 'reports' : 'investigations' ); $titles = array( 'scheduling' => __( 'Your site changes throughout the day. Your scan schedule can too.', 'shieldlume-security' ), 'investigations' => __( 'Several findings. One place to keep your review moving.', 'shieldlume-security' ), 'reports' => __( 'Show what you checked, what you did, and what still needs attention.', 'shieldlume-security' ), ); $copy = array( 'scheduling' => __( 'Free includes daily scans. Pro adds configurable intervals and checks after supported changes. Review the schedule before enabling it.', 'shieldlume-security' ), 'investigations' => __( 'Free includes complete findings and local guidance. Pro groups related observations, saves investigation progress and offers optional AI explanations with suggested checks.', 'shieldlume-security' ), 'reports' => __( 'Free includes evidence exports and notifications. Pro brings scan coverage, findings and recorded actions into a readable report for you or a client.', 'shieldlume-security' ), ); Experience::intro( __( 'OPTIONAL PRO PREVIEW', 'shieldlume-security' ), $titles[ $flow ], $copy[ $flow ] ); echo '

' . esc_html__( 'Sample data only. Browsing these local examples enables nothing, saves no task and sends no findings or AI requests.', 'shieldlume-security' ) . '

'; self::actionButton( $flow ); echo '' . esc_html__( 'Hide or restore Pro previews', 'shieldlume-security' ) . '

' . esc_html__( 'The action button remembers this task locally for your administrator account on this site for up to seven days. After installation and licence activation, review the tool and explicitly save your choices.', 'shieldlume-security' ) . '

'; if ( 'scheduling' === $flow ) { echo '

' . esc_html__( 'See a scheduling example', 'shieldlume-security' ) . '

' . esc_html__( 'Choose 15-minute, hourly, six-hour or daily checks. Optional change checks follow supported updates, plugin activations and theme changes. WordPress cron and your host affect timing; more frequent checks use more resources.', 'shieldlume-security' ) . '

'; self::image( '0.1.17-automation.png', __( 'Actual Pro scheduling controls showing a fictional saved routine and explicit save controls.', 'shieldlume-security' ), __( 'Configured timing and completed checks are different. This image does not change your own schedule.', 'shieldlume-security' ) ); self::offer(); echo '

' . esc_html__( 'Controlled recovery, one reviewed change at a time.', 'shieldlume-security' ) . '

' . esc_html__( 'For eligible file changes, Pro can prepare a verified replacement preview and protected recovery. Review the reference, approve the specific change, and inspect the recorded verification. Unsupported or changed files require a fresh review.', 'shieldlume-security' ) . '

'; self::actionButton( 'batches' ); self::image( '0.1.17-recovery.png', __( 'Actual Pro reviewed file-restoration interface with a fictional eligible file change.', 'shieldlume-security' ), __( 'An example of the review step, not an approval or repair on this site. Free keeps evidence, native editing links and rescanning.', 'shieldlume-security' ) ); echo '
'; } elseif ( 'investigations' === $flow ) { self::image( '0.1.17-investigations.png', __( 'Actual Pro investigation with grouped fictional findings and saved review progress.', 'shieldlume-security' ), __( 'Suggested relationships help organize review; they do not establish a common cause or prove an infection.', 'shieldlume-security' ) ); self::offer(); echo '

' . esc_html__( 'An explanation you can check against the evidence.', 'shieldlume-security' ) . '

' . esc_html__( 'See an example explanation, suggested check, limitations and the local evidence it relates to. The example below is written sample content; opening it makes no AI request.', 'shieldlume-security' ) . '

'; self::actionButton( 'ai' ); self::image( '0.1.17-ai.png', __( 'Actual Pro AI explanation card populated with a written fictional explanation, suggested checks and limitations.', 'shieldlume-security' ), __( 'Written example, not a live provider answer. Real AI use requires separate permission and eligible service access. An explanation does not certify a clean or infected site.', 'shieldlume-security' ) ); echo '
'; } else { echo '

' . esc_html__( 'A report made by the actual Pro report tool', 'shieldlume-security' ) . '

' . esc_html__( 'This example was generated from fictional records using Pro’s report renderer. Print the HTML report or save it as a PDF using your browser. Coverage limits and outstanding work remain visible; nothing is automatically uploaded or emailed.', 'shieldlume-security' ) . '

'; self::image( '0.1.17-report.png', __( 'Actual generated Pro report with fictional scan coverage, findings, recorded actions and remaining work.', 'shieldlume-security' ), __( 'A real report rendering with sample records. It describes retained evidence; it is not a security certificate or proof that a site is clean.', 'shieldlume-security' ) ); self::offer(); } echo '

' . esc_html__( 'Already included in Free: daily scanning, full findings, local guidance, evidence exports and notifications. These continue without buying Pro.', 'shieldlume-security' ) . '

'; Journey::renderContinuation(); } /** Read-only invitations. Never call Journey::requestButton just to view an example. */ public static function invitation( string $workflow, bool $insideForm = false ): void { if ( Journey::suggestionHidden( $workflow ) ) { return; } $copy = array( 'scheduling' => __( 'Need checks more often? Preview flexible Pro schedules.', 'shieldlume-security' ), 'investigations' => __( 'Keep related findings together in a Pro investigation.', 'shieldlume-security' ), 'ai' => __( 'See an example AI explanation and suggested checks.', 'shieldlume-security' ), 'batches' => __( 'Preview Pro’s reviewed file-restoration process.', 'shieldlume-security' ), 'reports' => __( 'See how Pro turns findings and recorded actions into a readable report.', 'shieldlume-security' ), ); if ( ! isset( $copy[ $workflow ] ) ) { return; } $id = 'avai-preview-dismiss-' . $workflow; echo '
PRO' . esc_html( $copy[ $workflow ] ) . ''; if ( $insideForm ) { self::$dismissForms[ $workflow ] = $id; echo ''; } else { self::dismissForm( $workflow, $id ); } echo '
'; } private static function dismissForm( string $workflow, string $id ): void { echo '
'; wp_nonce_field( 'antivirus_ai_journey_dismiss', '_avai_journey_nonce' ); if ( ! isset( self::$dismissForms[ $workflow ] ) ) { echo ''; } echo '
'; } public static function finishInlineForms(): void { foreach ( self::$dismissForms as $workflow => $id ) { self::dismissForm( $workflow, $id ); } self::$dismissForms = array(); } public static function preferences(): void { echo '

' . esc_html__( 'Pro previews', 'shieldlume-security' ) . '

' . esc_html__( 'Hide the three optional preview tabs and all Pro suggestions for your administrator account on this site. Restore brings back the tabs and any individually hidden suggestions. Your security settings and saved task stay unchanged.', 'shieldlume-security' ) . '

' . esc_html( Journey::previewsHidden() ? __( 'Pro previews are hidden.', 'shieldlume-security' ) : __( 'Pro previews are shown.', 'shieldlume-security' ) ) . '

'; foreach ( array( 'hide' => __( 'Hide Pro previews', 'shieldlume-security' ), 'restore' => __( 'Restore Pro previews', 'shieldlume-security' ) ) as $choice => $label ) { echo '
'; wp_nonce_field( 'antivirus_ai_journey_preferences', '_avai_journey_nonce' ); submit_button( $label, 'secondary', 'submit', false ); echo '
'; } echo '
'; } public static function cards(): void { echo '
'; foreach ( array( 'scheduling' => __( 'Automation', 'shieldlume-security' ), 'investigations' => __( 'Investigations & AI', 'shieldlume-security' ), 'reports' => __( 'Reports', 'shieldlume-security' ) ) as $flow => $label ) { echo '
' . esc_html__( 'PRO PREVIEW', 'shieldlume-security' ) . '

' . esc_html( $label ) . '

' . esc_html__( 'See a Pro example', 'shieldlume-security' ) . '

'; } echo '
'; } }