'use strict';

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

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

/**
 * Returns the proposed `note` applied to the checkout.
 */
function useNote() {
  const api$1 = api.useApi();
  const extensionTarget = api$1.extension.target;
  if (!('note' in api$1)) {
    throw new errors.ExtensionHasNoFieldError('note', extensionTarget);
  }
  return subscription.useSubscription(api$1.note);
}

exports.useNote = useNote;
