import{B as y}from"./SearchModal-YI3bdWA9.js";import{a as B,T as C,b as S}from"./SortingByFilter-CjZ8gKSr.js";import{D as N,F as L,B as M}from"./DirectionFilter-D7FJ9CMu.js";import{_ as f}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{r as v,o as a,c as l,b as s,k as x,a as d,F as k,i as w,j as h,t as m,p as b,l as g,d as F,e as j,g as E,w as p}from"./app-lT3z3TR3.js";const z={name:"ClientAdditionalProgramFilter",components:{DirectionFilter:N,FormEducationalFilter:L,BudgetFilter:M,SortingByFilter:B,TagFilter:C,CategoryFilter:S,BaseIcon:y},data(){return{}},props:{forms_educational:{type:Object},categories:{type:Object},form_education_filter:{type:Object},category_filter:{type:Object},qualification_filter:{type:Object}}},D={id:"hs-offcanvas-example",class:"hs-overlay hs-overlay-open:translate-x-0 hidden -translate-x-full fixed top-0 start-0 transition-all duration-300 transform h-full max-w-xs w-full z-[80] bg-white border-e overflow-auto",role:"dialog",tabindex:"-1","aria-labelledby":"hs-offcanvas-example-label"},I={class:"p-4"},$={class:"hs-accordion-group"},q=["id"],P=["aria-labelledby"],O=["id"],T=["aria-labelledby"];function A(t,e,o,n,u,i){const r=v("FormEducationalFilter"),c=v("CategoryFilter");return a(),l(k,null,[e[3]||(e[3]=s("div",{class:""},[s("button",{type:"button",class:"py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none","aria-haspopup":"dialog","aria-expanded":"false","aria-controls":"hs-offcanvas-example","data-hs-overlay":"#hs-offcanvas-example"},[s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])])],-1)),s("div",D,[e[2]||(e[2]=x('
',1)),s("div",I,[s("div",$,[s("div",{class:"hs-accordion",id:"id"+o.form_education_filter.type},[e[0]||(e[0]=x('',1)),s("div",{id:"hs-basic-with-arrow-collapse-two",class:"hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300",role:"region","aria-labelledby":"id"+o.form_education_filter.type},[d(r,{forms:o.forms_educational,formEdu_filter:o.form_education_filter},null,8,["forms","formEdu_filter"])],8,P)],8,q),s("div",{class:"hs-accordion",id:"id"+o.category_filter.type},[e[1]||(e[1]=x('',1)),s("div",{id:"hs-basic-with-arrow-collapse-two",class:"hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300",role:"region","aria-labelledby":"id"+o.category_filter.type},[d(c,{categories:o.categories,category_filter:o.category_filter},null,8,["categories","category_filter"])],8,T)],8,O)])])])],64)}const ve=f(z,[["render",A]]),V={name:"CategoryBadge",components:{Link:w},data(){return{}},methods:{clearFilter(){let t=new URL(window.location.href);const e=[];for(const[n]of t.searchParams)n.startsWith(this.filter.param)&&e.push(n);e.forEach(n=>t.searchParams.delete(n));let o=t.toString();this.$inertia.visit(o,{method:"get"})}},props:{filter:{type:Object}}},R={key:0,class:"inline-flex items-center gap-x-1.5 py-1.5 ps-3 pe-2 rounded-full text-xs font-medium bg-blue-100 text-blue-800"};function U(t,e,o,n,u,i){return this.filter.value!==null?(a(),l("span",R,[h(m(o.filter.value.length>1?o.filter.value.length+" категории":o.filter.content[o.filter.value[0]].data.title)+" ",1),s("button",{onClick:e[0]||(e[0]=b((...r)=>i.clearFilter&&i.clearFilter(...r),["prevent"])),type:"button",class:"shrink-0 size-4 inline-flex items-center justify-center rounded-full hover:bg-blue-200 focus:outline-none focus:bg-blue-200 focus:text-blue-500"},e[1]||(e[1]=[s("span",{class:"sr-only"},"Remove badge",-1),s("svg",{class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M18 6 6 18"}),s("path",{d:"m6 6 12 12"})],-1)]))])):g("",!0)}const W=f(V,[["render",U]]),H={name:"FormBadge",components:{Link:w},data(){return{}},methods:{clearFilter(){let t=new URL(window.location.href);const e=[];for(const[n]of t.searchParams)n.startsWith(this.filter.param)&&e.push(n);e.forEach(n=>t.searchParams.delete(n));let o=t.toString();this.$inertia.visit(o,{method:"get"})}},props:{filter:{type:Object}}},G={key:0,class:"inline-flex items-center gap-x-1.5 py-1.5 ps-3 pe-2 rounded-full text-xs font-medium bg-blue-100 text-blue-800"};function J(t,e,o,n,u,i){return this.filter.value!==null?(a(),l("span",G,[h(m(o.filter.value)+" ",1),s("button",{onClick:e[0]||(e[0]=b((...r)=>i.clearFilter&&i.clearFilter(...r),["prevent"])),type:"button",class:"shrink-0 size-4 inline-flex items-center justify-center rounded-full hover:bg-blue-200 focus:outline-none focus:bg-blue-200 focus:text-blue-500"},e[1]||(e[1]=[s("span",{class:"sr-only"},"Remove badge",-1),s("svg",{class:"shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[s("path",{d:"M18 6 6 18"}),s("path",{d:"m6 6 12 12"})],-1)]))])):g("",!0)}const K=f(H,[["render",J]]),Q={name:"ProgramBadge",components:{Link:w,CategoryBadge:W,FormBadge:K},data(){return{}},methods:{getComponent(t){return{category:"CategoryBadge",form:"FormBadge"}[t]||null}},props:{filters:{type:Object}}};function X(t,e,o,n,u,i){return a(!0),l(k,null,F(o.filters,(r,c)=>(a(),j(E(i.getComponent(r.type)),{key:c,filter:r},null,8,["filter"]))),128)}const be=f(Q,[["render",X]]),Y={name:"AdditionalEducationProgramListBreadcrumbs",components:{BaseIcon:y,Link:w},data(){return{}},methods:{textLimit(t,e){if(t.length>e){let o;return o=t.substring(0,e),o+"..."}return t},isMobileDevice(){return window.innerWidth<1024},handleSectionClick(t){this.isMobileDevice()?this.toggleMobileNavSection(t):this.toggleDesktopNavSection(t)},handleSubSectionClick(t,e){this.isMobileDevice()?this.toggleMobileNavSubSection(t,e):this.toggleDesktopNavSubSection(t,e)},highlightNavItem(t){t.classList.add("animate-pulse"),setTimeout(()=>{t.classList.remove("animate-pulse")},4e3)},openMobileNavMenu(){document.getElementById("open-mobile-btn").click()},toggleMobileNavSubSection(t,e){this.openMobileNavMenu();const o=document.getElementById("open-mobile-nav"),n=o.querySelector("#nav-section-accordion-"+t.data.slug),u=o.querySelector("#nav-section-accordion-btn-"+t.data.slug);n.classList.contains("active")||u.click();const i=o.querySelector("#nav-sub-section-accordion-"+e.data.slug),r=o.querySelector("#nav-sub-section-accordion-btn-"+e.data.slug);i.classList.contains("active")&&r.click(),this.highlightNavItem(i)},toggleMobileNavSection(t){const e=document.getElementById("open-mobile-nav"),o=e.querySelector("#nav-section-accordion-"+t.data.slug),n=e.querySelector("#nav-section-accordion-btn-"+t.data.slug);o.classList.contains("active")&&n.click(),this.openMobileNavMenu(),this.highlightNavItem(o)},toggleDesktopNavSubSection(t,e){const o=document.getElementById("desktop-nav"),n=o.querySelector("#nav-sub-section-title-"+e.data.slug);o.querySelector("#nav-section-btn-"+t.data.slug).click(),this.highlightNavItem(n)},toggleDesktopNavSection(t){const e=document.getElementById("desktop-nav");e.querySelector("#nav-section-menu-"+t.data.slug),e.querySelector("#nav-section-btn-"+t.data.slug).click()}},props:{breadcrumbs:{type:Object},eventTitle:{type:String}}},Z={class:"flex justify-between pb-4 items-center"},ee={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},te={class:"grow"},oe={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},se={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},ne={class:"text-sm"},ie={key:0,class:"text-sm"},re={key:1,class:"text-sm"},ae={class:"text-sm"},le={key:1,class:"flex items-center whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},ce={class:"text-sm"},de={class:"text-sm"};function ue(t,e,o,n,u,i){const r=v("BaseIcon"),c=v("Link");return a(),l("div",Z,[s("div",ee,[s("div",te,[s("div",oe,[o.breadcrumbs?(a(),l("ol",se,[s("li",ne,[d(c,{href:t.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:p(()=>[d(r,{class:"size-5",name:"home"})]),_:1},8,["href"])]),o.breadcrumbs.mainSection?(a(),l("li",ie,[s("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[0]||(e[0]=b(_=>i.handleSectionClick(this.breadcrumbs.mainSection),["prevent"]))},[e[2]||(e[2]=s("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+m(i.textLimit(this.breadcrumbs.mainSection.data.title,25)),1)])])):g("",!0),o.breadcrumbs.subSection?(a(),l("li",re,[s("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[1]||(e[1]=b(_=>i.handleSubSectionClick(this.breadcrumbs.mainSection,this.breadcrumbs.subSection),["prevent"]))},[e[3]||(e[3]=s("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+m(i.textLimit(this.breadcrumbs.subSection.data.title,25)),1)])])):g("",!0),s("li",ae,[d(c,{href:t.route("client.additionalEducation.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:p(()=>[e[4]||(e[4]=s("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+m(i.textLimit("Дополнительное образование",30)),1)]),_:1},8,["href"])])])):g("",!0),o.breadcrumbs?g("",!0):(a(),l("ol",le,[s("li",ce,[d(c,{href:t.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:p(()=>[d(r,{class:"size-5",name:"home"})]),_:1},8,["href"])]),s("li",de,[d(c,{href:t.route("client.additionalEducation.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:p(()=>[e[5]||(e[5]=s("svg",{class:"flex-shrink-0 mx-2 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),h(" "+m(i.textLimit("Дополнительное образование",30)),1)]),_:1},8,["href"])])]))])])])])}const we=f(Y,[["render",ue]]);export{we as A,ve as C,be as P};