<?php
/**
 * Dashboard & UI Functions
 *
 * Tabs, notices, and pro features for the dashboard
 *
 * @since   3.0.0
 * @package WC_Affiliate
 */

/**
 * Display login form based on platform
 *
 * @since 1.0
 */
function wca_affiliate_login_form() {
	wp_login_form();

	printf(
		'<p class="lost_password"><a href="%s" target="_blank">%s</a></p>',
		esc_url( wp_lostpassword_url() ),
		esc_html__( 'Lost your password?', 'wc-affiliate' )
	);
}

/**
 * Generates and returns the HTML for the affiliate registration form.
 *
 * @param array $atts An array of attributes used to customize the affiliate registration form.
 *
 * @return string The generated HTML markup for the affiliate registration form, passed through the 'wca_affiliate_register_form' filter.
 */
function wca_affiliate_register_form( array $atts ) {
	$form_html = wca_get_template( 'registration-form', 'views/front/forms', array( 'atts' => $atts ) );

	return apply_filters( 'wc_affiliate_registration_form', $form_html );
}
