{#
/**
 * Unified Twig Template for {{BLOCK_NAMESPACE}}/{{BLOCK_SLUG}}
 *
 * This template works for both static (client-side) and dynamic (server-side) blocks.
 * For static blocks, this Twig template is converted to JavaScript at build time.
 * For dynamic blocks, this template is rendered server-side using the Twig engine.
 *
 * AVAILABLE VARIABLES:
 * ==================
 * Block Attributes:
 * - All block attributes are available as variables by their attribute name
 * - Example: If you have a 'title' attribute, use title variable
 * - Nested attributes use dot notation for property access
 * - Array attributes support iteration with for loops
 *
 * WordPress Integration Variables:
 * - wrapper_attributes: Block wrapper attributes string (includes CSS classes, data attributes)
 * - content: Block content (for blocks with inner content support)
 * - post: Current post data (ID, title, permalink, excerpt, date, author, featured_image)
 * - site: Site data (name, description, url, language, admin_email)
 * - helpers: Helper functions (get_image_url, format_date, get_post_meta)
 *
 * SECURITY BEST PRACTICES:
 * =======================
 * - All output is auto-escaped by default for security
 * - Use |wp_kses_post for HTML content (allows safe HTML tags, blocks unsafe ones)
 * - The |raw filter is blocked by the sandbox security policy
 * - Always use WordPress escaping filters for user content:
 *   - |esc_html: Escape HTML entities (for text content)
 *   - |esc_attr: Escape HTML attributes (for attribute values)
 *   - |esc_url: Escape URLs (for href, src attributes)
 *   - |wp_kses_post: Allow safe HTML tags (for rich text content)
 * - wrapper_attributes and inner_blocks are pre-marked as safe by the engine
 *
 * COMMON PATTERNS:
 * ===============
 * Conditional rendering:
 * Check if attribute exists before rendering
 * Apply esc_html filter for text output
 * Loop through arrays:
 * Iterate over array attributes with for loops
 * Access item properties with dot notation
 *
 * Image handling:
 * Check image_attribute.url exists
 * Use |esc_url for src and |esc_attr for alt
 *
 * Link handling:
 * Use link_attribute.url, link_attribute.title, and link_attribute.opensInNewTab
 * Example: Check if link exists, render anchor with conditional target attribute
 *
 *
 * Date formatting:
 * Use |date('M j, Y') filter to format dates
 *
 * @see https://twig.symfony.com/doc/3.x/
 * @see https://developer.wordpress.org/block-editor/
 */
#}

<div {{ wrapper_attributes }}>
	{# Generated attribute examples based on your block's attributes #}
{{ATTRIBUTE_EXAMPLES}}
</div>
