<commit_before>//{namespace name=backend/bepado/view/main}

//{block name="backend/bepado/view/export/filter"}
Ext.define('Shopware.apps.Bepado.view.export.Filter', {
    extend: 'Ext.container.Container',
    alias: 'widget.bepado-export-filter',

    width: 200,
    layout: {
        type: 'vbox',
        align : 'stretch',
        pack  : 'start'
    },
    //layout: {
    //    type: 'accordion',
    //    animate: Ext.isChrome
    //},
    animCollapse: Ext.isChrome,
    border: false,

    initComponent: function() {
        var me = this;

        me.statusFilter = me.getStatusFilter();
        me.categoryFilter = me.getCategoryFilter();
        me.supplierFilter = me.getSupplierFilter();
        me.searchFilter = me.getSearchFilter();

        Ext.applyIf(me, {
            items: [
                me.statusFilter, me.searchFilter,
                me.supplierFilter, me.categoryFilter
            ]
        });

        me.callParent(arguments);
    },

    getCategoryFilter: function() {
        var me = this;
        return {
            xtype: 'treepanel',
            id: 'export-category-filter',
            title: '{s name=export/filter/category_title}Category filter{/s}',
            rootVisible: false,
            root: {
                id: 1,
                expanded: true
            },
            store: 'base.CategoryTree',
            flex: 2,
            dockedItems: [
                me.createTreeBottomBar()
            ]
        }
    },

    createTreeBottomBar: function () {
        return { xtype: 'toolbar',
            dock: 'bottom',
            items: [{
                    xtype: 'button',
                    text: '{s name=export/filter/clear_category_filter}Clear category filter{/s}',<commit_msg>[CON-2697] Show as accordion filters in Export view<commit_after>//{namespace name=backend/bepado/view/main}

//{block name="backend/bepado/view/export/filter"}
Ext.define('Shopware.apps.Bepado.view.export.Filter', {
    extend: 'Ext.panel.Panel',
    alias: 'widget.bepado-export-filter',

    width: 200,
    layout: 'accordion',
    border: false,

    initComponent: function() {
        var me = this;

        me.statusFilter = me.getStatusFilter();
        me.categoryFilter = me.getCategoryFilter();
        me.supplierFilter = me.getSupplierFilter();
        me.searchFilter = me.getSearchFilter();

        Ext.applyIf(me, {
            items: [
                me.categoryFilter,
                me.statusFilter,
                me.searchFilter,
                me.supplierFilter
            ]
        });

        me.callParent(arguments);
    },

    getCategoryFilter: function() {
        var me = this;
        return {
            xtype: 'treepanel',
            id: 'export-category-filter',
            title: '{s name=export/filter/category_title}Category filter{/s}',
            rootVisible: false,
            root: {
                id: 1,
                expanded: true
            },
            store: 'base.CategoryTree',
            flex: 2,
            dockedItems: [
                me.createTreeBottomBar()
            ]
        }
    },

    createTreeBottomBar: function () {
        return { xtype: 'toolbar',
            dock: 'bottom',
            items: [{
                    xtype: 'button',
                    text: '{s name=export/filter/clear_category_filter}Clear category filter{/s}',
{'fraction_non_alphanumeric': 0.12437223042836042, 'fraction_numerical': 0.00413589364844904, 'mean_word_length': 1.6370716510903427, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3820872', 'n_tokens_mistral': 993, 'n_tokens_neox': 951, 'n_words': 172}