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

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

    /**
     * Constructor.
     */
    public function __construct($container)
    {
        $this->container   = $container;
        $this->name        = 'local-seo/store-locator-inline';
        $this->title       = __('Store Locator - Inline', 'local-seo');
        $this->description = _x('A store locator layout where map and location list are side-by-side', 'local-seo');
        $this->keywords    = [];
    }

    /**
     * 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:mlsl-block/store-locator {"map_height":700,"show_description":false,"map_and_listing_container_layout":"inline","listing_container_margin":{"top":"0","right":"0","bottom":"0","left":"10px","equalSpace":false},"listing_container_border":{"width":{"top":"0","right":"0","bottom":"0","left":"0"},"color":"#eeeeee","style":"solid","equalWidth":true},"location_text_container_margin":{"top":"0","right":"0","bottom":"15px","left":"0","equalSpace":false},"location_text_container_border":{"width":{"top":"1px","right":"1px","bottom":"1px","left":"1px"},"color":"#eeeeee","style":"solid","equalWidth":true},"address_typography":{"fontFamily":{"label":"inherit","value":"inherit","google":false},"fontSize":"13px","fontWeight":"normal","fontStyle":"normal","lineHeight":"normal","letterSpacing":"normal","wordSpacing":"normal","textAlign":"inherit","textTransform":"none","color":"#555555","colorHover":"initial"}} /-->';
    }

}
