export const prepareMerchantPage = () => {
  let metaViewport = document.querySelector("meta[name='viewport']");
  if (metaViewport) {
    const content = metaViewport.getAttribute('content');
    const hasMaximumScale = content?.includes('maximum-scale=1');
    if (!hasMaximumScale) {
      metaViewport.setAttribute('content', `${content}, maximum-scale=1`);
    }
    return;
  }

  metaViewport = document.createElement('meta');
  metaViewport.setAttribute('name', 'viewport');
  metaViewport.setAttribute('content', 'width=device-width, initial-scale=1, maximum-scale=1');
  document.head.appendChild(metaViewport);
};
