'use strict'

/** Инициализация мини окна телефонии */
export const initWindow = function(options) {
  let proportions = {
    width: 300,
    height: 241
  };
  let basic_url = './stocks/telephony/callWindow.php';
  let windows_settings = `name=${options.name}&api_name=${options.api_name}&prefix=${options.prefix}`;

  let win = window.open(
    `${basic_url}?${windows_settings}`,
    `${options.prefix}_miniAtcWindowName`,
    `location=0,width=${proportions.width},height=${proportions.height}`
  );

  win.telephony_options = options;
}
