<?php
/**
 * Customize Toggle control class.
 *
 * @package paws-and-care
 *
 * @see     WP_Customize_Control
 * @access  public
 */

/**
 * Class Paws_And_Care_Customize_Toggle_Control
 */
class Paws_And_Care_Customize_Toggle_Control extends Paws_And_Care_Customize_Base_Control {

	/**
	 * Customize control type.
	 *
	 * @access public
	 * @var    string
	 */
	public $type = 'paws-and-care-toggle';

	/**
	 * Render the control content.
	 *
	 * @access protected
	 * @return void
	 */
	protected function render_content() {
		?>
		<label for="<?php echo esc_attr( $this->id ); ?>">
			<?php if ( ! empty( $this->label ) ) : ?>
				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
			<?php endif; ?>
			<?php if ( ! empty( $this->description ) ) : ?>
				<span class="description customize-control-description"><?php echo esc_html( $this->description ); ?></span>
			<?php endif; ?>
			<input
				type="checkbox"
				id="<?php echo esc_attr( $this->id ); ?>"
				name="<?php echo esc_attr( $this->id ); ?>"
				value="1"
				<?php $this->link(); ?>
				<?php checked( $this->value() ); ?>
				style="display: none !important;"
			/>
			<span class="switch"></span>
		</label>
		<?php
	}

}
