<?php

namespace GriffinForms\Admin\Html\Modals;

/**
 * Delete FormThemes Modal
 * Extends DeleteItems modal for deleting FormTheme items
 * Provides custom modal content with side effects information
 */
class DeleteFormThemes extends \GriffinForms\Admin\Html\Modals\DeleteItems
{
    /**
     * Override modalContent to add FormTheme-specific side effects information
     */
    protected function modalContent()
    {
        echo '<div class="text-start">';
        $this->itemsSelectedText();
        $this->noItemsSelectedText();
        echo '</div>';

        // Add FormTheme-specific side effects information
        $this->sideEffectsNotice();
    }

    /**
     * Custom heading text for FormThemes delete modal
     */
    protected function itemsSelectedText()
    {
        echo '<span id="griffinforms-delete-items-confirm-text">';
        echo wp_kses_post($this->lang->getText('deleteFormThemes', 'ModalText'));
        echo '</span>';
    }

    /**
     * Custom no items selected text for FormThemes
     */
    protected function noItemsSelectedText()
    {
        echo '<span id="griffinforms-delete-noitems-text" style="display:none;">';
        echo esc_html($this->lang->getText('noFormThemesSelected', 'ModalText'));
        echo '</span>';
    }

    /**
     * Render side effects notice for FormTheme deletion
     */
    protected function sideEffectsNotice()
    {
        echo '<div class="alert alert-light mt-3 mb-0 small">';
        echo '<strong>' . esc_html__('Note:', 'griffinforms-form-builder') . '</strong> ';
        echo wp_kses_post($this->lang->getText('deleteFormThemesSideEffects', 'Text'));
        echo '</div>';
    }
}
