@use 'px' as *;
@use 'true' as *;

@include test-module('utils.flatmap') {
    //not working
    // @include test('flat-get') {
    //     @include assert-equal(
    //         flat-get(
    //             (
    //                 colors: (
    //                     red: #f00,
    //                 ),
    //             ),
    //             'colors:red'
    //         ),
    //         #f00
    //     );
    // }
    //
    // @include test('flat-set') {
    //     @include assert-equal(
    //         flat-set(
    //             (
    //                 (
    //                     colors: (
    //                         red: #f00,
    //                     )
    //                 ),
    //                 'colors:blue',
    //                 #00f
    //             ),
    //             colors: {red: #F00, blue: #00F}
    //         )
    //     );
    // }
    //
    @include test('flatten-map') {
        @include assert-equal(
            flatten-map(
                (
                    colors: (
                        red: #f00,
                        blue: #00f,
                    ),
                )
            ),
            (
                'colors:red': #f00,
                'colors:blue': #00f,
            )
        );
    }

    //NEED HELP WITH ALL OF THEM UNTIL THE LAST ONE
    @include test('flat-has-key') {
        @include assert-equal(
            flat-has-key(
                (
                    colors: (
                        red: #f00,
                        blue: #00f,
                    ),
                ),
                'colors:blue'
            ),
            true
        );
    }
}
