export function getProjectTitle(): string {
  const projectNameNode: HTMLElement = document.querySelector("[id$='_ProjectNameLabel']")!;
  return projectNameNode.innerText;
}

export function getStoreLabel(): string {
  const storeNameNode: HTMLElement = document.querySelector("[id$='_StoreNameLabel']")!;
  return storeNameNode.innerText;
}

export function getStoreName(): string {
  const storeNameRegex = /\bt[0-9]{4}\b/i;
  const match = storeNameRegex.exec(getStoreLabel());
  if (!match) {
    throw new Error("store name match is null");
  }
  return match[0];
}
