import 'bootstrap'
import TryItForm from "./form"
import '@fortawesome/fontawesome-pro/css/all.min.css'

import 'typeface-raleway'
import '../sass/style.scss'

$('[data-toggle="tooltip"]').tooltip();

let $form = $('#try-form');
let $toggle = $('#form-toggle');

let form = new TryItForm($form, $toggle);

$toggle.click(() => {
    form.toggle();
    return false;
});

let $edit = $('#snippet-edit').click(() => {
    let $snippet = $('#snippet');

    form.source   = $snippet.data('source');
    form.language = $snippet.data('language');

    form.show();
});
