{"ast":null,"code":"import { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, createStaticVNode as _createStaticVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\";\nconst _hoisted_1 = {\n  class: \"header\"\n};\nconst _hoisted_2 = /*#__PURE__*/_createStaticVNode(\"<nav class=\\\"navbar navbar-expand-lg navbar-light bg-light shadow-sm\\\"><div class=\\\"container\\\"><a class=\\\"navbar-brand fs-3 fw-bold\\\" href=\\\"{{ Route(&#39;index&#39;) }}\\\">Мой Не Сам</a><button class=\\\"navbar-toggler\\\" type=\\\"button\\\" data-bs-toggle=\\\"collapse\\\" data-bs-target=\\\"#navbarNav\\\" aria-controls=\\\"navbarNav\\\" aria-expanded=\\\"false\\\" aria-label=\\\"Toggle navigation\\\"><span class=\\\"navbar-toggler-icon\\\"></span></button><div class=\\\"collapse navbar-collapse justify-content-end\\\" id=\\\"navbarNav\\\"> @auth <div class=\\\"d-flex gap-2\\\"><a href=\\\"{{Route(&#39;account&#39;)}}\\\" class=\\\"btn btn-outline-primary\\\">Личный кабинет</a><a href=\\\"{{Route(&#39;logout&#39;)}}\\\" class=\\\"btn btn-outline-danger\\\">Выйти</a></div> @else <div><a href=\\\"{{Route(&#39;login&#39;)}}\\\" class=\\\"btn btn-primary\\\">Войти</a></div> @endauth </div></div></nav>\", 1);\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return _openBlock(), _createElementBlock(\"header\", _hoisted_1, [_hoisted_2, _createCommentVNode(\" <div class=\\\"container\\\">\\n        <a href=\\\"\\\" class=\\\"logos\\\"><img src=\\\"@/assets/images/logo.jpg\\\" alt=\\\"\\\" /></a>\\n\\n        <div v-if=\\\"token\\\"> \\n            <button class=\\\"but\\\">Абоненты</button>\\n            <button class=\\\"but\\\" @click=\\\"changeTemplate('User', au.id)\\\">Профиль</button>\\n            <button class=\\\"but\\\" @click=\\\"logout\\\">Выйти</button>\\n        </div>\\n\\n        <div v-if=\\\"!token\\\">\\n          <button  class=\\\"but\\\" @click=\\\"changeTemplate('Login')\\\">Войти</button>\\n        </div>\\n    </div> \")]);\n}","map":{"version":3,"names":["class","_createStaticVNode","_createElementBlock","_hoisted_1","_hoisted_2","_createCommentVNode"],"sources":["C:\\xampp\\htdocs\\dmodels_vue\\src\\components\\HeaderComponent.vue"],"sourcesContent":["<template>\n  <header class=\"header\">\n\n    <nav class=\"navbar navbar-expand-lg navbar-light bg-light shadow-sm\">\n    <div class=\"container\">\n      <a class=\"navbar-brand fs-3 fw-bold\" href=\"{{ Route('index') }}\">Мой Не Сам</a>\n      <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarNav\" \n        aria-controls=\"navbarNav\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n        <span class=\"navbar-toggler-icon\"></span>\n      </button>\n      <div class=\"collapse navbar-collapse justify-content-end\" id=\"navbarNav\">\n        @auth\n          <div class=\"d-flex gap-2\">\n            <a href=\"{{Route('account')}}\" class=\"btn btn-outline-primary\">Личный кабинет</a>\n            <a href=\"{{Route('logout')}}\" class=\"btn btn-outline-danger\">Выйти</a>\n          </div>\n        @else\n          <div>\n            <a href=\"{{Route('login')}}\" class=\"btn btn-primary\">Войти</a>\n          </div>\n        @endauth\n      </div>\n    </div>\n  </nav>\n\n\n    <!-- <div class=\"container\">\n        <a href=\"\" class=\"logos\"><img src=\"@/assets/images/logo.jpg\" alt=\"\" /></a>\n\n        <div v-if=\"token\"> \n            <button class=\"but\">Абоненты</button>\n            <button class=\"but\" @click=\"changeTemplate('User', au.id)\">Профиль</button>\n            <button class=\"but\" @click=\"logout\">Выйти</button>\n        </div>\n\n        <div v-if=\"!token\">\n          <button  class=\"but\" @click=\"changeTemplate('Login')\">Войти</button>\n        </div>\n    </div> -->\n</header>\n\n</template>\n<script>\nimport server from \"@/assets/js/scripts\";\n\nexport default {\n  props: [\"auser\", \"au\", \"u\", \"changeTemplate\", \"token\", \"serverpublic\", \"removeToken\", \"user\"],\n  mounted() {\n    console.log(this.au.id);\n    this.auser();\n  },\n  methods: {\n    logout() {\n      server.postData(\"logout\", \"GET\").then(() => {\n        this.removeToken();\n        this.changeTemplate(\"HomePage\");\n      })\n    },\n  },\n};\n</script>"],"mappings":";;EACUA,KAAK,EAAC;AAAQ;gCADxBC,kBAAA;;uBACEC,mBAAA,CAsCO,UAtCPC,UAsCO,GApCLC,UAoBI,EAGJC,mBAAA,mhBAYU,C"},"metadata":{},"sourceType":"module","externalDependencies":[]}