<?php
namespace WPT\MLSL\Blocks\Patterns;

/**
 * SingleLocationPage01.
 */
class SingleLocationPage01
{
    protected $container;
    protected $title;
    protected $description;
    protected $keywords;
    protected $name;

    /**
     * Constructor.
     */
    public function __construct($container)
    {
        $this->container   = $container;
        $this->name        = 'mlsl/single-location-page-01';
        $this->title       = __('Single Location Page - 01', 'seo-for-local');
        $this->description = _x('Block pattern for single location page. Includes location address, opening hours & map.', 'seo-for-local');
        $this->keywords    = ['single location', 'block pattern', 'pattern'];
    }

    /**
     * Register block pattern
     */
    public function register_block_pattern()
    {
        register_block_pattern(
            $this->name,
            [
                'title'       => $this->title,
                'description' => $this->description,
                'keywords'    => $this->keywords,
                'categories'  => ['mlsl'],
                'content'     => $this->get_content(),
            ]
        );

    }

    /**
     * Get the content
     */
    public function get_content()
    {
        return '<!-- wp:columns -->
    	<div class="wp-block-columns"><!-- wp:column -->
    	<div class="wp-block-column"><!-- wp:heading {"level":3} -->
    	<h3>Address</h3>
    	<!-- /wp:heading -->

    	<!-- wp:mlsl-block/location-address {"address_typography":{"fontFamily":{"label":"inherit","value":"inherit","google":false},"fontSize":"inherit","fontWeight":"normal","fontStyle":"normal","lineHeight":"normal","letterSpacing":"normal","wordSpacing":"normal","textAlign":"inherit","textTransform":"none","color":"#555555","colorHover":"initial"}} /-->

    	<!-- wp:heading {"level":3} -->
    	<h3>Opening Hours</h3>
    	<!-- /wp:heading -->

    	<!-- wp:mlsl-block/location-opening-hours {"time_typography":{"fontFamily":{"label":"inherit","value":"inherit","google":false},"fontSize":"inherit","fontWeight":"normal","fontStyle":"normal","lineHeight":"normal","letterSpacing":"normal","wordSpacing":"normal","textAlign":"inherit","textTransform":"none","color":"#555555","colorHover":"initial"},"closed_label_typography":{"fontFamily":{"label":"inherit","value":"inherit","google":false},"fontSize":"inherit","fontWeight":"normal","fontStyle":"normal","lineHeight":"normal","letterSpacing":"normal","wordSpacing":"normal","textAlign":"inherit","textTransform":"none","color":"#555555","colorHover":"initial"}} /--></div>
    	<!-- /wp:column -->

    	<!-- wp:column -->
    	<div class="wp-block-column"><!-- wp:heading {"level":3} -->
    	<h3>Map</h3>
    	<!-- /wp:heading -->

    	<!-- wp:mlsl-block/location-map {"map_height":350} /--></div>
    	<!-- /wp:column --></div>
    	<!-- /wp:columns -->';
    }

}
