<?php
defined( 'ABSPATH' ) || exit;
/**
 * Timezone note partial.
 *
 * Expected variables:
 * - Optional: $bookaro_timezone_label (string)
 * - Optional fallback: $timezone (string token value)
 */
$bookaro_timezone_label = isset( $bookaro_timezone_label ) && is_string( $bookaro_timezone_label )
    ? trim( $bookaro_timezone_label )
    : '';
if ( $bookaro_timezone_label === '' && isset( $timezone ) && is_string( $timezone ) ) {
    $bookaro_timezone_label = trim( $timezone );
}
if ( $bookaro_timezone_label === '' && function_exists( 'wp_timezone_string' ) ) {
    $bookaro_timezone_label = (string) wp_timezone_string();
}
if ( $bookaro_timezone_label === '' ) {
    $bookaro_timezone_object = wp_timezone();
    if ( $bookaro_timezone_object instanceof \DateTimeZone ) {
        $bookaro_timezone_label = (string) $bookaro_timezone_object->getName();
    }
}
if ( $bookaro_timezone_label === '' ) {
    return;
}
?>
<p class="bookaro-meta-note">
    <strong><?php esc_html_e( 'Timezone:', 'mybookaro' ); ?></strong>
    <?php echo esc_html( $bookaro_timezone_label ); ?>
</p>
