<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

$reasons   = gigneo_option( '_gigneo_ts_block_account_reasons' );
$unique_id = uniqid();
?>
<div id="gn-service-reject-modal" class="gn-modal-wrapper gn-reject-service-modal">
	<div class="gn-modal-dialog">
		<div class="gn-modal-content">
			<div class="gn-modal-info">
				<div class="gn-modal-header">
					<h4 class="gn-title"><?php echo esc_html__( 'Reject service submission', 'gigneo' ); ?></h4>
					<p class="gn-description"><?php echo esc_html__( 'Please select a reason for rejecting this service.', 'gigneo' ); ?></p>
					<button type="button" data-gn-modal-close="gn-service-reject-modal" class="gn-modal-close">
						<i class="hi hi-x-mark" aria-hidden="true"></i>
					</button>
				</div>
				<form id="gn-service-reject-form">
					<div class="gn-modal-body gn-custom-scrollbar">
						<div class="gn-form-fields">
							<div class="gn-form-field gn-rejection-type">
								<div class="gn-radio">
									<input type="radio" name="rejection_type" class="gn-required-field" id="gn-soft-rejection" value="soft" checked>
									<label for="gn-soft-rejection">
										<i class="hi hi-globe-alt"></i>
										<span><?php echo esc_html__( 'Soft rejection', 'gigneo' ); ?></span>
										<em><?php echo esc_html__( 'Service will be returned to the freelancer for edits and can be resubmitted.', 'gigneo' ); ?></em>
									</label>
								</div>
								<div class="gn-radio">
									<input type="radio" name="rejection_type" class="gn-required-field" id="gn-hard-rejection" value="hard">
									<label for="gn-hard-rejection">
										<i class="hi hi-map-pin"></i>
										<span><?php echo esc_html__( 'Hard rejection', 'gigneo' ); ?></span>
										<em><?php echo esc_html__( 'Service will be removed and cannot be resubmitted.', 'gigneo' ); ?></em>
									</label>
								</div>
							</div>
							<div class="gn-form-field gn-request-changes">
								<label class="gn-required-field-label" for="gn-request-changes-<?php echo esc_attr( $unique_id ); ?>"><?php echo esc_html__( 'Request Changes', 'gigneo' ); ?></label>
								<textarea id="gn-request-changes-<?php echo esc_attr( $unique_id ); ?>" name="request_changes" class="gn-required-field" autocomplete="off" rows="5" placeholder="<?php echo esc_attr__( 'Write details here...', 'gigneo' ); ?>"></textarea>
							</div>
							<div class="gn-form-field gn-rejection-detail d-none">
								<label class="gn-required-field-label" for="gn-rejection-detail-<?php echo esc_attr( $unique_id ); ?>"><?php echo esc_html__( 'Rejection details', 'gigneo' ); ?></label>
								<textarea id="gn-rejection-detail-<?php echo esc_attr( $unique_id ); ?>" class="gn-not-required-field" name="rejection_detail" autocomplete="off" rows="5" placeholder="<?php echo esc_attr__( 'Write details here...', 'gigneo' ); ?>"></textarea>
							</div>
							</div>
					</div>
					<div class="gn-modal-footer">
						<input type="hidden" class="gn-required-field" name="service_id" value=""/>
						<button type="button" class="gn-btn gn-btn-outline-grey" data-gn-modal-close="gn-service-reject-modal"><?php echo esc_html__( 'Close', 'gigneo' ); ?></button>
						<button type="submit" class="gn-btn gn-btn-danger"><?php echo esc_html__( 'Reject', 'gigneo' ); ?></button>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
