
// (function() {
//     tinymce.PluginManager.add('culturando_columns', function(editor, url) {
//         // SVG inline de 2 colunas (20x20px) em base64
//         var iconDataUri = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIiBmaWxsPSJub25lIiBzdHJva2U9IiM1NTU1NTUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIyIiB5PSIyIiB3aWR0aD0iNyIgaGVpZ2h0PSIxNiIgcng9IjEiLz48cmVjdCB4PSIxMSIgeT0iMiIgd2lkdGg9IjciIGhlaWdodD0iMTYiIHJ4PSIxIi8+PC9zdmc+';

//         editor.addButton('culturando_columns', {
//             title: 'Inserir Layout de Colunas',
//             image: iconDataUri,
//             onclick: function() {
//                 editor.insertContent(
//                     '<div class="columns">\n' +
//                     '  <div class="col"><p>Conteúdo da primeira coluna...</p></div>\n' +
//                     '  <div class="col"><p>Conteúdo da segunda coluna...</p></div>\n' +
//                     '</div>'
//                 );
//             }
//         });
//     });
// })();
(function() {
    tinymce.PluginManager.add('culturando_columns', function(editor, url) {
        
        // Ícone: Colunas Iguais [  |  ]
        var iconEqual = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIiBmaWxsPSJub25lIiBzdHJva2U9IiM1NTU1NTUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIyIiB5PSIyIiB3aWR0aD0iNyIgaGVpZ2h0PSIxNiIgcng9IjEiLz48cmVjdCB4PSIxMSIgeT0iMiIgd2lkdGg9IjciIGhlaWdodD0iMTYiIHJ4PSIxIi8+PC9zdmc+';
        
        // Ícone: Colunas Assimétricas [ |   ] (estreita + larga)
        var iconAsymmetric = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIiBmaWxsPSJub25lIiBzdHJva2U9IiM1NTU1NTUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB4PSIyIiB5PSIyIiB3aWR0aD0iNCIgaGVpZ2h0PSIxNiIgcng9IjEiLz48cmVjdCB4PSI4IiB5PSIyIiB3aWR0aD0iMTAiIGhlaWdodD0iMTYiIHJ4PSIxIi8+PC9zdmc+';

        // Botão 1: Colunas Iguais
        editor.addButton('culturando_columns_equal', {
            title: 'Colunas Iguais (50%/50%)',
            image: iconEqual,
            onclick: function() {
                editor.insertContent(
                    '<div class="columns">\n' +
                    '  <div class="col">Conteúdo da primeira coluna...</div>\n' +
                    '  <div class="col">Conteúdo da segunda coluna...</div>\n' +
                    '</div>'
                );
            }
        });

        // Botão 2: Colunas Assimétricas (Imagem + Texto)
        editor.addButton('culturando_columns_asymmetric', {
            title: 'Imagem + Texto (35%/65%)',
            image: iconAsymmetric,
            onclick: function() {
                editor.insertContent(
                    '<div class="columns columns--image-text">\n' +
                    '  <div class="col col--narrow">Imagem aqui...</div>\n' +
                    '  <div class="col col--wide">Texto descritivo sobre a imagem...</div>\n' +
                    '</div>'
                );
            }
        });
    });
})();