import { registerPlugin } from '@wordpress/plugins';
import { NovaPostWidgetBlock } from './NovaPostWidgetBlock';
import { ExperimentalOrderShippingPackages as WC_Slot_ShippingOptions } from '@woocommerce/blocks-checkout';
import { bindAnalyticsEventDeliveryMethodSelected } from '../../services/analyticsService/eventBindDom';

const render = () => {
  return (
    <WC_Slot_ShippingOptions>
      <NovaPostWidgetBlock />
    </WC_Slot_ShippingOptions>
  );
};

registerPlugin('nova-post-widget', {
  render,
  scope: 'woocommerce-checkout',
});

bindAnalyticsEventDeliveryMethodSelected();
