import {registerPaymentMethod} from '@woocommerce/blocks-registry';
import {getSetting} from '@woocommerce/settings';
import React from "react";
const settings = getSetting('tami_woocommerce_data', {});
const Content = () => {
    if(typeof settings.description !== "string")
        settings.description = "";
    return window.wp.htmlEntities.decodeEntities( settings.description );
};
const TamiBlock = {
    name: "tami_woocommerce",
    label: settings.title,
    content: Object( window.wp.element.createElement )( Content, null ),
    edit: Object( window.wp.element.createElement )( Content, null ),
    canMakePayment: () => true,
    ariaLabel: settings.title,
    supports: {
        features: [ 'products' ]
    }
};
registerPaymentMethod(TamiBlock);
