// Set localStorage to use mock API from Unpkg for demo purposes
function initDemoMode(version) {
  const pathName = `@cloudbeds/payment-element-webcomponent@${version}/demo/mock-api`;
  const mockApiUrl = (window.location.hostname.match('unpkg.com'))
    ? `https://unpkg.com/${pathName}`
    : `https://jsdelivr.net/${pathName}`

  window.localStorage.setItem('__api_domain', mockApiUrl);
  window.localStorage.setItem('__paym_sdk_api_url', mockApiUrl);
  window.localStorage.setItem('__paym_sdk_base_url', mockApiUrl);

  console.log('🎭 Demo mode enabled - using mock API at:', mockApiUrl);
}
