<?php
/**
 * The Radio Icon customize control extends the WP_Customize_Control class.
 *
 * @package customizer-controls
 */

if ( ! class_exists( 'WP_Customize_Control' ) ) {
	return;
}


/**
 * Class Code4rest_Control_Import_Export
 *
 * @access public
 */
class Code4rest_Control_Import_Export extends WP_Customize_Control {
	/**
	 * Control type
	 *
	 * @var string
	 */
	public $type = 'code4rest_import_export_control';
	/**
	 * Empty Render Function to prevent errors.
	 */
	public function render_content() {
		?>
			<span class="customize-control-title">
				<?php esc_html_e( 'Export', 'code4rest' ); ?>
			</span>
			<span class="description customize-control-description">
				<?php esc_html_e( 'Click the button below to export the customization settings for this theme.', 'code4rest' ); ?>
			</span>
			<input type="button" class="button code4rest-theme-export code4rest-theme-button" name="code4rest-theme-export-button" value="<?php esc_attr_e( 'Export', 'code4rest' ); ?>" />

			<hr class="kt-theme-hr" />

			<span class="customize-control-title">
				<?php esc_html_e( 'Import', 'code4rest' ); ?>
			</span>
			<span class="description customize-control-description">
				<?php esc_html_e( 'Upload a file to import customization settings for this theme.', 'code4rest' ); ?>
			</span>
			<div class="code4rest-theme-import-controls">
				<input type="file" name="code4rest-theme-import-file" class="code4rest-theme-import-file" />
				<?php wp_nonce_field( 'code4rest-theme-importing', 'code4rest-theme-import' ); ?>
			</div>
			<div class="code4rest-theme-uploading"><?php esc_html_e( 'Uploading...', 'code4rest' ); ?></div>
			<input type="button" class="button code4rest-theme-import code4rest-theme-button" name="code4rest-theme-import-button" value="<?php esc_attr_e( 'Import', 'code4rest' ); ?>" />

			<hr class="kt-theme-hr" />
			<span class="customize-control-title">
				<?php esc_html_e( 'Reset', 'code4rest' ); ?>
			</span>
			<span class="description customize-control-description">
				<?php esc_html_e( 'Click the button to reset all theme settings.', 'code4rest' ); ?>
			</span>
			<input type="button" class="components-button is-destructive code4rest-theme-reset code4rest-theme-button" name="code4rest-theme-reset-button" value="<?php esc_attr_e( 'Reset', 'code4rest' ); ?>" />
			<?php
	}
}