<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$wpefb_placeholder_types     = array( 'text', 'textarea', 'description', 'email', 'first_name', 'last_name', 'user_name', 'user_email', 'user_url', 'user_pass', 'confirm_pass', 'mobile_number', 'phone_number', 'date', 'datepicker', 'select', 'dropdown', 'language', 'country', 'timezone' );
$wpefb_text_preview_types    = array( 'text', 'email', 'number', 'first_name', 'last_name', 'user_name', 'user_email', 'nickname', 'user_url', 'user_pass', 'confirm_pass', 'mobile_number', 'phone_number' );
$wpefb_default_value_types   = array( 'select', 'dropdown', 'date', 'datepicker', 'country', 'timezone', 'language' );
$wpefb_dropdown_option_types = array( 'select', 'dropdown' );
$wpefb_required_types        = array( 'text', 'textarea', 'description', 'email', 'number', 'select', 'dropdown', 'radio', 'checkbox', 'first_name', 'last_name', 'user_name', 'user_email', 'nickname', 'user_url', 'user_pass', 'confirm_pass', 'mobile_number', 'phone_number', 'country', 'timezone', 'gender', 'language', 'date', 'datepicker' );

if ( class_exists( 'WPEFB_Features' ) && WPEFB_Features::is_field_type_available( 'multi_dropdown' ) ) {
	$wpefb_placeholder_types[]     = 'multi_dropdown';
	$wpefb_default_value_types[]   = 'multi_dropdown';
	$wpefb_dropdown_option_types[] = 'multi_dropdown';
}

if ( class_exists( 'WPEFB_Features' ) && WPEFB_Features::is_field_type_available( 'repeatable_text' ) ) {
	$wpefb_text_preview_types[] = 'repeatable_text';
	$wpefb_required_types[]     = 'repeatable_text';
}

if ( class_exists( 'WPEFB_Features' ) && WPEFB_Features::is_field_type_available( 'term_checkbox' ) ) {
	$wpefb_required_types[] = 'term_checkbox';
}

if ( class_exists( 'WPEFB_Features' ) && (
	WPEFB_Features::is_field_type_available( 'file' ) ||
	WPEFB_Features::is_field_type_available( 'file_upload' ) ||
	WPEFB_Features::is_field_type_available( 'fileupload' ) ||
	WPEFB_Features::is_field_type_available( 'image' ) ||
	WPEFB_Features::is_field_type_available( 'user_avatar' )
) ) {
	$wpefb_required_types = array_merge( $wpefb_required_types, array( 'file', 'file_upload', 'fileupload', 'image', 'user_avatar' ) );
}
?>
<form id="field-settings-form" class="wefb-field-settings-form">
  <input type="hidden" name="field-id" />

  <h3><?php esc_html_e( 'Field Settings', 'vedrixa-forms-registration-builder' ); ?></h3>

  <!-- Label -->
  <div class="form-row required">
    <label>
      <?php esc_html_e( 'Label', 'vedrixa-forms-registration-builder' ); ?>*
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Displayed label for this field. Use only letters, numbers, underscores.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="text" name="label">
  </div>

  <!-- Reference Name -->
  <div class="form-row required">
    <label>
      <?php esc_html_e( 'Reference Name', 'vedrixa-forms-registration-builder' ); ?>*
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Internal name (max 40 characters). Not visible to users.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="text" name="name">
  </div>

  <!-- Placeholder -->
  <div class="form-row field-setting-conditional" data-types="<?php echo esc_attr( implode( ' ', $wpefb_placeholder_types ) ); ?>">
    <label>
      <?php esc_html_e( 'Placeholder', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Text shown inside the field as a hint.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="text" name="placeholder">
  </div>

  <div class="form-row field-setting-conditional wefb-text-preview-row" data-types="<?php echo esc_attr( implode( ' ', $wpefb_text_preview_types ) ); ?>">
    <label>
      <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Quick preview of how this input field will look on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <div class="wefb-text-preview-card">
      <div class="wefb-text-preview-label"><?php esc_html_e( 'Text', 'vedrixa-forms-registration-builder' ); ?></div>
      <input type="text" class="wefb-text-preview-input" placeholder="<?php esc_attr_e( 'Type here...', 'vedrixa-forms-registration-builder' ); ?>" disabled>
    </div>
  </div>

  <div class="form-row field-setting-conditional wefb-textarea-preview-row" data-types="textarea description">
    <label>
      <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Quick preview of how this textarea field will look on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <div class="wefb-textarea-preview-card">
      <div class="wefb-textarea-preview-label"><?php esc_html_e( 'Textarea', 'vedrixa-forms-registration-builder' ); ?></div>
      <textarea class="wefb-textarea-preview-input" rows="4" placeholder="<?php esc_attr_e( 'Type here...', 'vedrixa-forms-registration-builder' ); ?>" disabled></textarea>
    </div>
  </div>

  <!-- CSS Class -->
  <div class="form-row">
    <label>
      <?php esc_html_e( 'CSS Class', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Custom CSS classes for additional styling.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="text" name="css_class">
  </div>

  <!-- Max Length -->
  <div class="form-row field-setting-conditional" data-types="text textarea description email first_name last_name user_name user_email user_url user_pass confirm_pass mobile_number phone_number">
    <label>
      <?php esc_html_e( 'Maximum Length', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Max number of characters allowed in this field.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="number" name="max_length" min="1">
  </div>

  <div class="form-row field-setting-conditional" data-types="user_pass">
    <label>
      <?php esc_html_e( 'Password Minimum Length', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Minimum characters required for password.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="number" name="password_min_length" min="4" value="8">
  </div>

  <div class="form-row field-setting-conditional" data-types="user_pass">
    <label class="toggle">
      <input type="checkbox" name="password_require_uppercase">
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Require Uppercase Letter', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
  </div>

  <div class="form-row field-setting-conditional" data-types="user_pass">
    <label class="toggle">
      <input type="checkbox" name="password_require_lowercase">
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Require Lowercase Letter', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
  </div>

  <div class="form-row field-setting-conditional" data-types="user_pass">
    <label class="toggle">
      <input type="checkbox" name="password_require_number">
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Require Number', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
  </div>

  <div class="form-row field-setting-conditional" data-types="user_pass">
    <label class="toggle">
      <input type="checkbox" name="password_require_special">
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Require Special Character', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
  </div>

  <div class="form-row field-setting-conditional" data-types="user_pass">
    <label class="toggle">
      <input type="checkbox" name="password_show_strength" checked>
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Show Password Strength Indicator', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
  </div>

  <!-- Default Value -->
  <div class="form-row field-setting-conditional" data-types="<?php echo esc_attr( implode( ' ', $wpefb_default_value_types ) ); ?>">
    <label>
      <?php esc_html_e( 'Default Value', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Pre-filled value in this field (option value for dropdown-like fields).', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="text" name="default_value">
  </div>
  
  <!-- Dropdown Options -->
<div class="form-row field-setting-conditional" data-types="<?php echo esc_attr( implode( ' ', $wpefb_dropdown_option_types ) ); ?>">
  <label>
    <?php esc_html_e( 'Dropdown Options', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Add label and value for each dropdown item. Supports reordering.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="option-list" data-option-type="dropdown">
    <div class="option-item">
      <input type="text" name="dropdown_option_label[]" placeholder="<?php esc_attr_e( 'Label', 'vedrixa-forms-registration-builder' ); ?>" class="option-label">
      <input type="text" name="dropdown_option_value[]" placeholder="<?php esc_attr_e( 'Value', 'vedrixa-forms-registration-builder' ); ?>" class="option-value">
      <button type="button" class="remove-option" aria-label="<?php esc_attr_e( 'Remove option', 'vedrixa-forms-registration-builder' ); ?>">
        <span class="dashicons dashicons-no-alt"></span>
      </button>
    </div>
  </div>
  <button type="button" class="add-option" data-target="dropdown"><?php esc_html_e( 'Add Option', 'vedrixa-forms-registration-builder' ); ?></button>
</div>

<div class="form-row field-setting-conditional wefb-dropdown-preview-row" data-types="<?php echo esc_attr( implode( ' ', $wpefb_dropdown_option_types ) ); ?>">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview how dropdown options appear on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-dropdown-preview-card">
    <div class="wefb-dropdown-preview-label"><?php esc_html_e( 'Dropdown', 'vedrixa-forms-registration-builder' ); ?></div>
    <select class="wefb-dropdown-preview-select" disabled>
      <option value=""><?php esc_html_e( 'No options yet', 'vedrixa-forms-registration-builder' ); ?></option>
    </select>
  </div>
</div>

<!-- Radio Options -->
<div class="form-row field-setting-conditional" data-types="radio">
  <label>
    <?php esc_html_e( 'Radio Options', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Add label and value for each radio option. Supports reordering.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="option-list" data-option-type="radio">
    <div class="option-item">
      <input type="text" name="radio_option_label[]" placeholder="<?php esc_attr_e( 'Label', 'vedrixa-forms-registration-builder' ); ?>" class="option-label">
      <input type="text" name="radio_option_value[]" placeholder="<?php esc_attr_e( 'Value', 'vedrixa-forms-registration-builder' ); ?>" class="option-value">
      <button type="button" class="remove-option" aria-label="<?php esc_attr_e( 'Remove option', 'vedrixa-forms-registration-builder' ); ?>">
        <span class="dashicons dashicons-no-alt"></span>
      </button>
    </div>
  </div>
  <button type="button" class="add-option" data-target="radio"><?php esc_html_e( 'Add Option', 'vedrixa-forms-registration-builder' ); ?></button>
</div>

<!-- Radio Default -->
<div class="form-row field-setting-conditional" data-types="radio">
  <label>
    <?php esc_html_e( 'Default Selected Option', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Choose which option is pre-selected. Leave as None for no default.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <select name="radio_default_value">
    <option value=""><?php esc_html_e( 'None', 'vedrixa-forms-registration-builder' ); ?></option>
  </select>
</div>

<div class="form-row field-setting-conditional wefb-radio-preview-row" data-types="radio">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview how radio options appear on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-radio-preview-card">
    <div class="wefb-radio-preview-label"><?php esc_html_e( 'Radio', 'vedrixa-forms-registration-builder' ); ?></div>
    <div class="wefb-radio-preview-options">
      <label class="wefb-radio-preview-option"><input type="radio" disabled> <?php esc_html_e( 'Option 1', 'vedrixa-forms-registration-builder' ); ?></label>
    </div>
  </div>
</div>

<!-- Checkbox Options -->
<div class="form-row field-setting-conditional" data-types="checkbox">
  <label>
    <?php esc_html_e( 'Checkbox Options', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Add label and value for each checkbox option. Supports reordering.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="option-list" data-option-type="checkbox">
    <div class="option-item">
      <input type="text" name="checkbox_option_label[]" placeholder="<?php esc_attr_e( 'Label', 'vedrixa-forms-registration-builder' ); ?>" class="option-label">
      <input type="text" name="checkbox_option_value[]" placeholder="<?php esc_attr_e( 'Value', 'vedrixa-forms-registration-builder' ); ?>" class="option-value">
      <button type="button" class="remove-option" aria-label="<?php esc_attr_e( 'Remove option', 'vedrixa-forms-registration-builder' ); ?>">
        <span class="dashicons dashicons-no-alt"></span>
      </button>
    </div>
  </div>
  <button type="button" class="add-option" data-target="checkbox"><?php esc_html_e( 'Add Option', 'vedrixa-forms-registration-builder' ); ?></button>
</div>

<div class="form-row field-setting-conditional wefb-checkbox-preview-row" data-types="checkbox">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview how checkbox options appear on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-checkbox-preview-card">
    <div class="wefb-checkbox-preview-label"><?php esc_html_e( 'Checkbox', 'vedrixa-forms-registration-builder' ); ?></div>
    <div class="wefb-checkbox-preview-options">
      <label class="wefb-checkbox-preview-option"><input type="checkbox" disabled> <?php esc_html_e( 'Option 1', 'vedrixa-forms-registration-builder' ); ?></label>
    </div>
  </div>
</div>

<div class="form-row field-setting-conditional wefb-date-preview-row" data-types="date datepicker">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview date field appearance on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-date-preview-card">
    <div class="wefb-date-preview-label"><?php esc_html_e( 'Date', 'vedrixa-forms-registration-builder' ); ?></div>
    <input type="date" class="wefb-date-preview-input" disabled>
  </div>
</div>

<div class="form-row field-setting-conditional wefb-country-preview-row" data-types="country">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview country field appearance on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-country-preview-card">
    <div class="wefb-country-preview-label"><?php esc_html_e( 'Country', 'vedrixa-forms-registration-builder' ); ?></div>
    <select class="wefb-country-preview-select" disabled>
      <option value="US"><?php esc_html_e( 'United States', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="IN"><?php esc_html_e( 'India', 'vedrixa-forms-registration-builder' ); ?></option>
    </select>
  </div>
</div>

<div class="form-row field-setting-conditional wefb-timezone-preview-row" data-types="timezone">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview timezone field appearance on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-timezone-preview-card">
    <div class="wefb-timezone-preview-label"><?php esc_html_e( 'Timezone', 'vedrixa-forms-registration-builder' ); ?></div>
    <select class="wefb-timezone-preview-select" disabled>
      <option value="UTC"><?php esc_html_e( 'UTC', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="Asia/Kolkata"><?php esc_html_e( 'Asia/Kolkata', 'vedrixa-forms-registration-builder' ); ?></option>
    </select>
  </div>
</div>

<div class="form-row field-setting-conditional wefb-language-preview-row" data-types="language">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview language field appearance on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-language-preview-card">
    <div class="wefb-language-preview-label"><?php esc_html_e( 'Language', 'vedrixa-forms-registration-builder' ); ?></div>
    <select class="wefb-language-preview-select" disabled>
      <option value="en"><?php esc_html_e( 'English', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="es"><?php esc_html_e( 'Spanish', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="fr"><?php esc_html_e( 'French', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="de"><?php esc_html_e( 'German', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="hi"><?php esc_html_e( 'Hindi', 'vedrixa-forms-registration-builder' ); ?></option>
    </select>
  </div>
</div>

<?php
if ( class_exists( 'WPEFB_Features' ) && (
	WPEFB_Features::is_field_type_available( 'file' ) ||
	WPEFB_Features::is_field_type_available( 'file_upload' ) ||
	WPEFB_Features::is_field_type_available( 'fileupload' ) ||
	WPEFB_Features::is_field_type_available( 'image' ) ||
	WPEFB_Features::is_field_type_available( 'user_avatar' )
) ) :
	?>
<div class="form-row field-setting-conditional wefb-file-preview-row" data-types="file file_upload fileupload image user_avatar">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview file field appearance on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-file-preview-card">
    <div class="wefb-file-preview-label"><?php esc_html_e( 'File Upload', 'vedrixa-forms-registration-builder' ); ?></div>
    <input type="file" class="wefb-file-preview-input" disabled>
  </div>
</div>

<div class="form-row field-setting-conditional" data-types="file file_upload fileupload image user_avatar">
  <label>
    <?php esc_html_e( 'Allowed File Types', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Comma-separated extensions or MIME types (e.g. .jpg,.png,application/pdf).', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <input type="text" name="accept" placeholder=".jpg,.png,.pdf">
</div>
<?php endif; ?>

<?php if ( class_exists( 'WPEFB_Features' ) && WPEFB_Features::is_field_type_available( 'term_checkbox' ) ) : ?>
<div class="form-row field-setting-conditional wefb-terms-preview-row" data-types="term_checkbox">
  <label>
    <?php esc_html_e( 'Live Preview', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Preview terms checkbox appearance on frontend.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <div class="wefb-terms-preview-card">
    <div class="wefb-terms-preview-label"><?php esc_html_e( 'Terms Checkbox', 'vedrixa-forms-registration-builder' ); ?></div>
    <label class="wefb-terms-preview-option"><input type="checkbox" disabled> <?php esc_html_e( 'I agree to the terms and conditions', 'vedrixa-forms-registration-builder' ); ?></label>
  </div>
</div>

<div class="form-row field-setting-conditional" data-types="term_checkbox">
  <label>
    <?php esc_html_e( 'Terms Text', 'vedrixa-forms-registration-builder' ); ?>
    <div class="form-element-help">
      <span class="label-info"></span>
      <span class="advrf-help-text"><?php esc_html_e( 'Text displayed next to the terms checkbox.', 'vedrixa-forms-registration-builder' ); ?></span>
    </div>
  </label>
  <textarea name="term_and_condition" rows="3"></textarea>
</div>
<?php endif; ?>


 

  <!-- Paragraph -->
  <div class="form-row field-setting-conditional required" data-types="paragraph">
    <label>
      <?php esc_html_e( 'Paragraph Text', 'vedrixa-forms-registration-builder' ); ?>*
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Content to show as paragraph.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <textarea name="paragraph_text"></textarea>
  </div>

  <!-- Textarea Dimensions -->
  <div class="form-row field-setting-conditional" data-types="textarea description">
    <label>
      <?php esc_html_e( 'Columns', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Width (in characters) of textarea.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="number" name="columns" min="2">
  </div>
  <div class="form-row field-setting-conditional" data-types="textarea description">
    <label>
      <?php esc_html_e( 'Rows', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Height (in rows) of textarea.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <input type="number" name="rows" min="2">
  </div>

  <!-- Heading Text -->
  <div class="form-row field-setting-conditional" data-types="heading">
    <label>
      <?php esc_html_e( 'Type', 'vedrixa-forms-registration-builder' ); ?>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Select tag (H1â€“H6) for heading importance.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
    <select name="heading_tag">
      <option value="h1"><?php esc_html_e( 'H1', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="h2"><?php esc_html_e( 'H2', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="h3"><?php esc_html_e( 'H3', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="h4"><?php esc_html_e( 'H4', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="h5"><?php esc_html_e( 'H5', 'vedrixa-forms-registration-builder' ); ?></option>
      <option value="h6"><?php esc_html_e( 'H6', 'vedrixa-forms-registration-builder' ); ?></option>
    </select>
  </div>

  <!-- Required Toggle -->
  <div class="form-row field-setting-conditional" data-types="<?php echo esc_attr( implode( ' ', array_unique( $wpefb_required_types ) ) ); ?>">
    <label class="toggle">
      <input type="checkbox" name="required">
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Required', 'vedrixa-forms-registration-builder' ); ?></span>
      <div class="form-element-help">
        <span class="label-info"></span>
        <span class="advrf-help-text"><?php esc_html_e( 'Require user selection before form submit.', 'vedrixa-forms-registration-builder' ); ?></span>
      </div>
    </label>
  </div>

  <!-- Privacy -->
  <fieldset>
    <legend><?php esc_html_e( 'Privacy', 'vedrixa-forms-registration-builder' ); ?></legend>
    <label class="radio-wrap">
      <input type="radio" name="visibility" value="1" checked>
      <span><?php esc_html_e( 'Public', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
    <label class="radio-wrap">
      <input type="radio" name="visibility" value="2">
      <span><?php esc_html_e( 'Registered', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
    <label class="radio-wrap">
      <input type="radio" name="visibility" value="3">
      <span><?php esc_html_e( 'Group Manager', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>
  </fieldset>

  <!-- Conditional Logic -->
  <fieldset>
    <legend><?php esc_html_e( 'Conditional Logic', 'vedrixa-forms-registration-builder' ); ?></legend>

    <label class="toggle">
      <input type="checkbox" name="enable_conditional_logic" id="enable_conditional_logic">
      <span class="slider"></span>
      <span class="label-text"><?php esc_html_e( 'Enable conditional logic', 'vedrixa-forms-registration-builder' ); ?></span>
    </label>

    <div class="conditional-logic-settings" style="display: none;">
      <div class="form-row">
        <label>
          <?php esc_html_e( 'Trigger Field', 'vedrixa-forms-registration-builder' ); ?>
          <div class="form-element-help">
            <span class="label-info"></span>
            <span class="advrf-help-text"><?php esc_html_e( 'Which field triggers this condition.', 'vedrixa-forms-registration-builder' ); ?></span>
          </div>
        </label>
        <select name="conditional_field">
          <option value=""><?php esc_html_e( '-- Select Field --', 'vedrixa-forms-registration-builder' ); ?></option>
        </select>
      </div>

      <div class="form-row">
        <label>
          <?php esc_html_e( 'Operator', 'vedrixa-forms-registration-builder' ); ?>
          <div class="form-element-help">
            <span class="label-info"></span>
            <span class="advrf-help-text"><?php esc_html_e( 'Condition to check (e.g. equals, contains).', 'vedrixa-forms-registration-builder' ); ?></span>
          </div>
        </label>
        <select name="conditional_operator">
          <option value="equals"><?php esc_html_e( 'Equals', 'vedrixa-forms-registration-builder' ); ?></option>
          <option value="not_equals"><?php esc_html_e( 'Not Equals', 'vedrixa-forms-registration-builder' ); ?></option>
          <option value="contains"><?php esc_html_e( 'Contains', 'vedrixa-forms-registration-builder' ); ?></option>
          <option value="not_contains"><?php esc_html_e( 'Does Not Contain', 'vedrixa-forms-registration-builder' ); ?></option>
        </select>
      </div>

      <div class="form-row">
        <label>
          <?php esc_html_e( 'Trigger Value', 'vedrixa-forms-registration-builder' ); ?>
          <div class="form-element-help">
            <span class="label-info"></span>
            <span class="advrf-help-text"><?php esc_html_e( 'The value that must match to trigger this field.', 'vedrixa-forms-registration-builder' ); ?></span>
          </div>
        </label>
        <input type="text" name="conditional_value">
      </div>
    </div>
  </fieldset>

  <?php
	/**
	 * Renders add-on field settings controls inside the builder field settings panel.
	 */
	do_action( 'wpefb_render_field_settings_extensions' );
	?>

  <!-- Actions -->
  <div class="form-actions">
    <button type="submit" class="button button-primary"><?php esc_html_e( 'Save', 'vedrixa-forms-registration-builder' ); ?></button>
    <button type="button" id="cancel-settings" class="button"><?php esc_html_e( 'Cancel', 'vedrixa-forms-registration-builder' ); ?></button>
  </div>
</form>
