#{$wrap} .mega-menu-toggle {
    @each $item in $menu_toggle_blocks {
        $id: nth($item, 1);
        $align: nth($item, 2);
        $closed_text: nth($item, 3);
        $open_text: nth($item, 4);
        $closed_icon: nth($item, 5);
        $open_icon: nth($item, 6);
        $text_color: nth($item, 7);
        $icon_color: nth($item, 8);
        $icon_position: nth($item, 9);
        $text_size: nth($item, 10);
        $icon_size: nth($item, 11);

        @if type-of($id) == number {

            .mega-toggle-block-#{$id} {

                @if $icon_position == before {
                    &:before {
                        content: $closed_icon;
                        font-family: 'dashicons';
                        font-size: $icon_size;
                        color: $icon_color;
                        margin: 0 5px 0 0;
                    }
                } @else {
                    &:after {
                        content: $closed_icon;
                        font-family: 'dashicons';
                        font-size: $icon_size;
                        color: $icon_color;
                        margin: 0 0 0 5px;
                    }
                }

                .mega-toggle-label {
                    color: $text_color;
                    font-size: $text_size;

                    .mega-toggle-label-open {
                        display: none;
                    }
                    
                    .mega-toggle-label-closed {
                        display: inline;
                    }
                }
            }

            &.mega-menu-open {

                .mega-toggle-block-#{$id} {
                    @if $icon_position == before {
                        &:before {
                            content: $open_icon;
                        }
                    } @else {
                        &:after {
                            content: $open_icon;
                        }
                    }

                    .mega-toggle-label-open {
                        display: inline;
                    }
                    .mega-toggle-label-closed {
                        display: none;
                    }
                }
            }
        }
    }

    @each $item in $spacer_toggle_blocks {

        $id: nth($item, 1);
        $align: nth($item, 2);
        $width: nth($item, 3);

        @if type-of($id) == number {

            .mega-toggle-block-#{$id} {
                width: $width;
                margin: 0;
            }

        }

    }

}