"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ucfirst = ucfirst;
exports.dashToPascal = dashToPascal;
exports.dashToDot = dashToDot;
exports.dashToCamel = dashToCamel;
exports.pascalToParam = pascalToParam;
exports.camelToParam = camelToParam;
exports.pascalToDot = pascalToDot;
exports.camelToDot = camelToDot;
exports.spaceToDash = spaceToDash;
exports.toSentence = toSentence;
exports.toUcSentence = toUcSentence;

var _noCase = _interopRequireDefault(require("no-case"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function ucfirst(string) {
  return string.charAt(0).toUpperCase() + string.slice(1);
}

function dashToPascal(string) {
  return string.split('-').map(el => ucfirst(el)).join('');
}

function dashToDot(string) {
  return string.replace('-', '.');
}

function dashToCamel(string) {
  return string.split('-').map((el, idx) => {
    if (idx === 0) {
      return el;
    }

    return ucfirst(el);
  }).join('');
}

function pascalToParam(value, locale) {
  return (0, _noCase.default)(value, locale, '-');
}

function camelToParam(value, locale) {
  return (0, _noCase.default)(value, locale, '-');
}

function pascalToDot(value, locale) {
  return (0, _noCase.default)(value, locale, '.');
}

function camelToDot(value, locale) {
  return (0, _noCase.default)(value, locale, '.');
}

function spaceToDash(string) {
  return string.toLowerCase().replace(' ', '-');
}

function toSentence(string, locale) {
  return ucfirst((0, _noCase.default)(string, locale));
}

function toUcSentence(string, locale) {
  return (0, _noCase.default)(string, locale, '-').split('-').map(el => ucfirst(el)).join(' ');
}