'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var api = require('./api.js');
var subscription = require('./subscription.js');

/**
 * Returns the delivery group the extension is attached to. This hook can only be used by extensions in the following
 * extension targets:
 * - purchase.checkout.shipping-option-list.render-before
 * - purchase.checkout.shipping-option-list.render-after
 *
 * > Caution: Deprecated as of version `2024-07`, use `useDeliveryGroupListTarget()` instead.
 *
 * @deprecated Deprecated as of version `2024-07`, use `useDeliveryGroupListTarget()` instead.
 */
function useDeliveryGroupTarget() {
  const api$1 = api.useApi();
  const target = subscription.useSubscription(api$1.target);
  return target === null || target === void 0 ? void 0 : target.deliveryGroups[0];
}

exports.useDeliveryGroupTarget = useDeliveryGroupTarget;
