const DEFAULT_VENDORGET_SETTINGS = {
  consentCaptureEnabled: true,
  requestMonitoringEnabled: false
};

const VENDORGET_SETTINGS_STORAGE_KEY = "vendorgetSettings";

async function getVendorGetSettings() {
  return getSettingsFromStorage(
    VENDORGET_SETTINGS_STORAGE_KEY,
    DEFAULT_VENDORGET_SETTINGS
  );
}

async function setVendorGetSetting(key, value) {
  return setSettingInStorage(
    VENDORGET_SETTINGS_STORAGE_KEY,
    DEFAULT_VENDORGET_SETTINGS,
    key,
    value
  );
}

async function isConsentCaptureEnabled() {
  return (await getVendorGetSettings()).consentCaptureEnabled;
}

async function isRequestMonitoringEnabled() {
  return (await getVendorGetSettings()).requestMonitoringEnabled;
}
