<?php
/* @var \Magetop\Advancepreview\Block\AdvancePreview $block */
?>

<script>
    require([
        'jquery'
    ],function ($) {
        var customRegister = {
            version: '2.5.0',
            init : function () {
                $('#assistance_allowed_checkbox').parent('div').css('display','none');
                $('#advanced-preview-customer-types ul li input').click(function () {
                    var type = $(this).val();
                    // $('#assistance_allowed_checkbox').parent('div').css('display','none');
                    console.log(type);
                    // $('#custom-fields-b2c').css('display','block');
                    console.log(type);
                    if(type === '3' || type === '2') {
                        $('#custom-fields-big').css('display','block');
                    }
                    else {
                        $('#custom-fields-big').css('display','none');
                    }
                    $('#txt-customer-group').val(type);

                })
            }
        }
        customRegister.init();
    })
</script>
