import React from 'react';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
export const DIALER_ACTION = 'PHONE_NUMBER';
export const URL_ACTION = 'CTA';
export const QUICK_REPLY = 'QUICK_REPLY';


export const HANDLERS = {
  IS_SAVED: 'isSaved',
  PHONE_NUMBER: 'phoneNumber',
  URL: 'url',
}


export const CTA_OPTIONS = [
  {
    key: DIALER_ACTION,
    value: DIALER_ACTION,
    label: <FormattedMessage {...messages.ctaPhoneNo} />,
  },
  {
    key: URL_ACTION,
    value: URL_ACTION,
    label: <FormattedMessage {...messages.ctaWebsite} />,
  },
  {
    key: QUICK_REPLY,
    value: QUICK_REPLY,
    label: <FormattedMessage {...messages.ctaQr} />,
  },
];

export const invalidVarRegex = /{{(.*?)}}/g;
export const BTN_MAX_LENGTH = 25;
export const PHONE_NUMBER_MAX_LENGTH = 15;
export const URL_MAX_LENGTH = 2000;
