import $ from 'jquery';
export const singlePreviewer = ()=>{
    const $noneDisplayable = $('.develux-previewer-none-displayable-js');
    const $tabContent = $('.product-tab-content-js');

    $('.develux-previewer-show-js').on('click', function () {
        const $parent = $(this).parent().parent();
        const $showIcon = $(this).find('.show-js');
        const $hideIcon = $(this).find('.hide-js');

        if ($parent.hasClass('to-trey')) {
            $parent.removeClass('to-trey');
            $noneDisplayable.show();
            $tabContent.removeClass('expanded');
        } else {
            $parent.addClass('to-trey');
            $noneDisplayable.hide();
            $tabContent.addClass('expanded');
        }

        $showIcon.toggleClass('hidden');
        $hideIcon.toggleClass('hidden');
    });
}