<?php
/**
 * Beaver Builder frontend template for Square Payment Link.
 *
 * @package SHC4WC
 *
 * @var SHC4WC_BB_Payment_Link $module  Module instance.
 * @var object                 $settings Module settings.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

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

// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- render_button returns escaped HTML.
echo SHC4WC_Payment_Link::instance()->render_button(
	array(
		'amount'      => isset( $settings->amount ) ? (string) $settings->amount : '',
		'label'       => isset( $settings->label ) ? (string) $settings->label : '',
		'description' => isset( $settings->description ) ? (string) $settings->description : '',
		'currency'    => isset( $settings->currency ) ? (string) $settings->currency : '',
	)
);
