<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Intopenai_Form_Admin_Settings_Level extends Authorization_Form_Admin_Level_Abstract
{
    public function init()
    {
        parent::init();

        // My stuff
        $this
        ->setTitle('Member Level Settings')
        ->setDescription('');

        if( !$this->isPublic() ) {

            $this->addElement('Select', 'image', array(
                'label' => 'Allow Image Generation?',
                'description' => 'Do you want to allow members of this level to generate AI images on your site?',
                "multiOptions" => array("1" => "Yes", "0" => "No"),
                'validators' => array(
                    // array('Int', true),
                    // new Engine_Validate_AtLeast(0),
                ),
                'value' => 1
            ));

            // Element: max
            $this->addElement('Text', 'image_price', array(
                'label' => 'Image Generation Price for 1 image',
                'description' => 'Enter the price which you want to charge from this user level to generate the 1 AI image. Enter 0 if you do not want to charge for image generation from this user level.',
                'validators' => array(
                    // array('Int', true),
                    // new Engine_Validate_AtLeast(0),
                ),
                'value' => 0
            ));

            $this->addElement('Select', 'content', array(
                'label' => 'Allow Content Generation?',
                'description' => 'Do you want to allow members of this level to generate AI contents on your site?',
                "multiOptions" => array("1" => "Yes", "0" => "No"),
                'validators' => array(
                    // array('Int', true),
                    // new Engine_Validate_AtLeast(0),
                ),
                'value' => 1
            ));

            // Element: max
            $this->addElement('Text', 'content_price', array(
                'label' => 'Content Generation Price per Word',
                'description' => 'Enter the price (per word) which you want to charge from this user level to generate the AI content. Enter 0 if you do not want to charge for content generation from this user level.',
                'validators' => array(
                    // array('Int', true),
                    // new Engine_Validate_AtLeast(0),
                ),
                'value' => 0
            ));
        }
    }
}
