<div class="column subcategory desktop">
    @if($decors_category)
        @foreach ($decors_category as $position => $single_category)
            @php
                $term = $single_category['select_category'];
                $children = get_term_children($term->term_id, 'decors-category');
            @endphp
                <div class="links" data-category="{!! $term->term_id !!}">
                    @if($children)
                        <div class="mb-8">
                            @foreach ($children as $key => $child)
                                @php
                                    $current = get_term($child, 'decors-category');
                                @endphp
                                <a href="{!! get_term_link($current, 'decors-category') !!}" data-category="{!! $current->term_id !!}"
                                    class="link">
                                    {!! $current->name !!}
                                </a>
                            @endforeach
                        </div>
                    <a href="{!! get_term_link($term->term_id) !!}" class="link see-all">
                        <span>{!! __('See all - ', 'thor') . $term->name !!}</span>
                        @svg('images/arrow-right.svg')
                    </a>
                    @endif
                </div>
        @endforeach
    @endif
</div>

@if($decors_category)
    @foreach($decors_category as $position => $single_category)
        @php
            $term = $single_category['select_category'];
            $children = get_term_children($term->term_id, 'decors-category');
        @endphp
        @if ($children)
            <div class="column subcategory mobile" data-category="{!! $term->term_id !!}">
                <button class="close button arrow">
                    @svg('images/arrow-left.svg')
                    <span>{!! __('Back', 'thor') !!}</span>
                </button>
                <div class="inner">
                    <div class="links">
                        <a class="link active">
                            {!! $term->name !!}
                        </a>
                    </div>
                    <div class="links">
                        @foreach ($children as $key => $child)
                            @php
                                $current = get_term($child, 'decors-category');
                            @endphp
                            <a
                                href="{!! get_term_link($current, 'decors-category') !!}" data-category
                                class="link">
                                {!! $current->name !!}
                            </a>
                        @endforeach
                    </div>
                    <a href="{!! get_term_link($term->term_id) !!}" class="link see-all">
                        <span>{!! __('See all - ') . $term->name !!}</span>
                        @svg('images/arrow-right.svg')
                    </a>
                </div>
            </div>
        @endif
    @endforeach
@endif