'use strict';
(function( $ ) {
    let editorSettings;

    let editors = $( '.pad-css-editor' );

    if ( ! editors.length ) {
        return;
    }
    editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};

    editorSettings.codemirror = _.extend( {}, editorSettings.codemirror, {
        lineNumbers: true,
        lineWrapping: true,
        indentUnit: 2,
        tabSize: 2,
        mode: 'css',
        lint: true,
        gutters: ['CodeMirror-lint-markers']
    } );

    wp.codeEditor.initialize( editors, editorSettings );
})( jQuery );
