<?php

namespace Saswp;

function property_maps_all_shortcode($_params) {
    $settings = (new Settings)->all()['data'] ?? [];

    $propertiesString = htmlentities(wp_json_encode($settings['properties']));

    return sprintf(
        '<div id="property-maps-all">
            <property-maps :properties="%s"></property-maps>
        </div>',
        $propertiesString
    );
}

