import './infoPage.scss';
import ArrActive from '/svg/arrow_active.svg';
import InfoCard from "../../cmp/infoCard/InfoCard.jsx";
import { AsyncAuthAjax } from "../../../controller/Ajax";
import { API } from "../../../dict/Consts";


const InfoPage = D.declare('view.page.InfoPage', () => {
    return <div class="info-page">
        <div class="info-page__wrapper">
            <button class="info-page__link-back" type="button" aria-label="Вернуться на предыдущую страницу">
                <ArrActive width="22" height="18"/>
            </button>
            <div class="info-page__card">
                {( update ) => {
                    let un, un2;
                    tmpStore.valEqualOnly( 'afterNavigation.to', 'InfoPage' )( async() => {

                        un && un();
                        un2 && un2();
                        un = store.sub('navigation.data.category', function(category) {
                            Model.categories.load(category, function(data) {
                                debugger
                            });



                        });

                        console.log( 'data', store.get( 'navigation.data' ) )
                    } );
                }}
                <InfoCard/>
            </div>
        </div>
    </div>
});

export default InfoPage;
export {InfoPage};
