"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.defaultLanguage = exports.DEFAULT_TUTORIAL = exports.DEFAULT_STEP = exports.DEFAULT_SNIPPET = exports.DEFAULT_ENDPOINT = void 0;

var Cookie = _interopRequireWildcard(require("js-cookie"));

var _supportedLanguages = _interopRequireDefault(require("@readme/oas-to-snippet/src/supportedLanguages"));

var _syntaxHighlighter = require("@readme/syntax-highlighter");

// Readme Libs
var defaultLanguage = function defaultLanguage() {
  var language = Cookie.get('readme_language');

  if (language && _supportedLanguages["default"][language]) {
    return {
      code: '',
      language: language,
      highlightedSyntax: _supportedLanguages["default"][language].highlight,
      name: (0, _syntaxHighlighter.uppercase)(language)
    };
  }

  return {
    code: '',
    language: 'c',
    highlightedSyntax: 'text/x-csrc',
    name: 'C'
  };
};

exports.defaultLanguage = defaultLanguage;
var DEFAULT_ENDPOINT = {
  method: '',
  slug: '',
  title: ''
};
exports.DEFAULT_ENDPOINT = DEFAULT_ENDPOINT;
var DEFAULT_SNIPPET = {
  endpoint: DEFAULT_ENDPOINT,
  codeOptions: [defaultLanguage()]
};
exports.DEFAULT_SNIPPET = DEFAULT_SNIPPET;
var DEFAULT_STEP = {
  title: '',
  body: '',
  isOpen: true,
  lineNumbers: ['']
};
exports.DEFAULT_STEP = DEFAULT_STEP;
var DEFAULT_TUTORIAL = {
  backgroundColor: '#018FF4',
  emoji: '🦉',
  response: '{"success":true}',
  referenceDisplay: [],
  steps: [DEFAULT_STEP],
  snippet: DEFAULT_SNIPPET,
  title: 'Recipe Title',
  description: 'Recipe Description'
};
exports.DEFAULT_TUTORIAL = DEFAULT_TUTORIAL;