export const addPhoneNumberPrefix = (value: string): string => {
  const prefix = value.startsWith('+') ? '' : '+';
  return prefix + value;
};

export const isPhoneNumberEmpty = (
  phoneNumber: string,
  code: string,
): boolean => {
  const fullCode = addPhoneNumberPrefix(code);
  const fullNumber = addPhoneNumberPrefix(phoneNumber);

  return fullCode === fullNumber;
};
