'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pluginType = exports.getTemplate = exports.getExtension = undefined;

var _ramda;

function _load_ramda() {
  return _ramda = _interopRequireDefault(require('ramda'));
}

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

var pluginType = 'file-type';

function getExtension() {
  return 'st.css';
}

function getTemplate(importSpecifiers) {
  var stNamed = '';

  if (importSpecifiers && importSpecifiers.length) {
    var specifiers = importSpecifiers.map(function (importSpecifier) {
      var mainFile = (_ramda || _load_ramda()).default.path(['importSpecifier', 'mainFile'], importSpecifier) || (_ramda || _load_ramda()).default.path(['importSpecifier', 'importSpecifiers', 'mainFile'], importSpecifier);
      return mainFile;
    }).join(', ');
    stNamed = `-st-named: ${specifiers};`;
  }
  return `:import { 
    -st-from: "{filePath}.st.css"; 
    ${stNamed}
}`;
}

exports.getExtension = getExtension;
exports.getTemplate = getTemplate;
exports.pluginType = pluginType;