provides the type, what type it is and if the animation
 * has a name.
 *
 * @param {Object} state
 */
function getFormattedTitle(state) {
  // Older servers don't send a type, and only know about
  // CSSAnimations and CSSTransitions, so it's safe to use
  // just the name.
  if (!state.type) {
    return state.name;
  }

  // Script-generated animations may not have a name.
  if (state.type === "scriptanimation" && !state.name) {
    return L10N.getStr("timeline.scriptanimation.unnamedLabel");
  }

  return L10N.getFormatStr(`timeline.${state.type}.nameLabel`, state.name);
}

module.exports = {
  getFormatStr: (...args) => L10N.getFormatStr(...args),
  getFormattedTitle,
  getInspectorStr: (...args) => INSPECTOR_L10N.getStr(...args),
  getStr: (...args) => L10N.getStr(...args),
  numberWithDecimals: (...args) => L10N.numberWithDecimals(...args),
};
PK