1import{n as e,ay as d,aB as T}from"./antdProComponents-6rzHkKcZ.js";import{k as F,b as q,d as C,n as k,P as c,E,J as x}from"./index-C8gtYebm.js";import"./antdForm-ZZ85gsAg.js";import{l as K}from"./react-_5RlvHhi.js";import{aG as S}from"./antdBase-DlFOY6T8.js";import{aJ as D}from"./antdIcons-DhY_pOHd.js";import{u as y}from"./query-Bn7EN5Pb.js";import{M as _}from"./utils-D8nkOfAZ.js";import{r as j,b as f}from"./others-6CDmzJG5.js";import"./antdTable-Cz58L6xH.js";import"./antdModal-Dh46Xjql.js";import"./pdfjs-Jc8nWIli.js";import"./jspdf-B1PPRTPs.js";import"./reactPdf-ChLvjV_L.js";import"./antdMaskInput-f6hZ1glU.js";import"./antdProTable-Ch7uEBlj.js";import"./chart-DuBnvqdM.js";import"./pdfLib-_sLH-ZSH.js";import"./x6-CTQrGuB4.js";import"./tiptap-IID5qgYO.js";const N=({data:n,type:r})=>e.jsx(F,{type:"white",children:e.jsxs(d,{justify:"space-between",className:"height-100",vertical:!0,children:[e.jsxs("div",{children:[e.jsx("p",{className:"FacultyPage__card-title",children:n.name}),e.jsx("p",{children:n.desc}),r==="eduProgramme"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"FacultyPage__card-title",children:"ÐÑаÑевлаÑÑÑÐ²Ð°Ð½Ð½Ñ Ð²Ð¸Ð¿ÑÑкникÑв"}),e.jsx("p",{children:n.employmentDesc})]})]}),n.link&&e.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(d,{gap:5,children:[e.jsx(S,{shape:"round",type:"primary",className:"text-ellipsis",ghost:!0,children:"ÐÑзнаÑиÑÑ Ð±ÑлÑÑе пÑо оÑвÑÑÐ½Ñ Ð¿ÑогÑамÑ"}),e.jsx(S,{icon:e.jsx(D,{}),shape:"circle",type:"primary",ghost:!0})]})})]})}),G=({link:n})=>{const{t:r}=q();return e.jsx("div",{className:"PageTitle",children:e.jsx("a",{className:"PageTitle__head decoration-none text-blue",href:n,target:"_blank",rel:"noopener noreferrer",children:r("faculty.outstanding_students")})})},J="https://drive.google.com/thumbnail?id=",B=(n,r)=>e.jsx(N,{data:n,type:"eduProgramme"},r),W=(n,r)=>e.jsx(N,{data:n,type:"international"},r),A=(n,r)=>{const m=n.img?`${J}${n.img}&sz=w1000`:n.image?n.image:void 0,u=n.name||n.full_name,a=n.description;return e.jsxs(d,{className:"FacultyPage__student",vertical:!0,children:[e.jsx(T,{src:m,width:200,height:200,className:"FacultyPage__student-img",placeholder:!0}),e.jsx("p",{className:"FacultyPage__student-name",children:u}),a&&e.jsx("div",{className:"FacultyPage__student-desc",children:e.jsx(_,{remarkPlugins:[j,f],children:a})})]},r)},O=(n,r)=>n==="Email"?`mailto:${r}`:n==="ÐонÑакÑний Ð½Ð¾Ð¼ÐµÑ ÑелеÑонÑ"?`tel:${r}`:n==="Instagram"?r.startsWith("http")?r:`https://instagram.com/${r.replace("@","")}`:n==="Facebook"?r.startsWith("http")?r:`https://facebook.com/${r.replace("@","")}`:n==="KSU"?r.startsWith("http")?r:`https://${r}`:n==="Telegram"?r.startsWith("http")?r:`https://t.me/${r.replace("@","")}`:null,oe=()=>{var b;const{t:n}=q(),{facultyName:r}=K(),{data:m}=y({queryKey:["faculties"],queryFn:()=>x.fetchDocuments({type_identifier:"config_departments_description",is_deleted:!1})}),u=(b=m==null?void 0:m.items)==null?void 0:b.find(s=>s.id===r),a=u==null?void 0:u.related_id,{data:t,isLoading:w}=y({queryKey:["faculty",a],queryFn:()=>x.fetchDocuments({type_identifier:"config_departments_description",related_id:a,is_deleted:!1}),enabled:!!a,select:s=>{var l,i;return(i=(l=s==null?void 0:s.items)==null?void 0:l[0])==null?void 0:i.content}}),{data:P,isLoading:I}=y({queryKey:["jars-edu-programs",a],queryFn:()=>x.fetchDocuments({type_identifier:"config_eps_description",content_filter:`department_id=${a}`,is_deleted:!1}),enabled:!!a,select:s=>(s==null?void 0:s.items)||[]}),{data:p,isLoading:v}=y({queryFn:()=>x.fetchDocuments({type_identifier:"config_departments_contacts",related_id:a,is_deleted:!1}),queryKey:["facultyContacts",a],enabled:!!a}),{data:g,isLoading:$}=y({queryKey:["jars-outstanding-graduates",a],queryFn:()=>x.fetchDocuments({type_identifier:"config_departments_outstanding_graduates",related_id:a,is_deleted:!1}),enabled:!!a,select:s=>{var l;return((l=s==null?void 0:s.items)==null?void 0:l.map(i=>i.content))||[]}});return C((t==null?void 0:t.name)||"ФакÑлÑÑеÑ"),!t&&!w?e.jsx("div",{children:"ФакÑлÑÑÐµÑ Ð½Ðµ знайдено"}
1):w?e.jsx(k,{}):e.jsxs("div",{className:"FacultyPage",children:[e.jsxs("div",{className:"FacultyPage__header",children:[e.jsx(c,{text:(t==null?void 0:t.name)||"",backLinkPath:"/dashboard",backLinkText:" ",inline:!0}),(t==null?void 0:t.description)&&e.jsx(_,{remarkPlugins:[j,f],children:t.description})]}),Array.isArray(t==null?void 0:t.eduProgrammes)&&t.eduProgrammes.length>0&&e.jsxs("div",{className:"FacultyPage__info",children:[e.jsx(c,{text:n("faculty.edu_programmes")}),e.jsx(d,{gap:20,wrap:"wrap",children:t.eduProgrammes.map(B)})]}),I?e.jsx(k,{}):(P==null?void 0:P.length)>0&&e.jsxs("div",{className:"FacultyPage__info",children:[e.jsx(c,{text:n("faculty.edu_programmes")}),e.jsx(d,{gap:20,wrap:"wrap",children:P.map((s,l)=>{var i,o,h,L;return e.jsx(N,{data:{name:(i=s.content)==null?void 0:i.name,desc:(o=s.content)==null?void 0:o.description,link:(h=s.content)==null?void 0:h.link_ep,employmentDesc:(L=s.content)==null?void 0:L.graduate_work},type:"eduProgramme"},s.id||l)})})]}),Array.isArray(t==null?void 0:t.international)&&t.international.length>0&&e.jsxs("div",{className:"FacultyPage__info",children:[e.jsx(c,{text:n("faculty.international")}),e.jsx(d,{gap:20,wrap:"wrap",children:t.international.map(W)})]}),(t==null?void 0:t.international_activity)&&e.jsxs("div",{className:"mt-6",children:[e.jsx(c,{className:"mb-6",text:n("faculty.international")}),e.jsx(d,{gap:20,wrap:"wrap",children:e.jsx(F,{type:"white",children:e.jsx(_,{remarkPlugins:[j,f],children:t.international_activity})})})]}),Array.isArray(p==null?void 0:p.items)&&p.items.filter(s=>{var l,i;return((l=s==null?void 0:s.content)==null?void 0:l.type)&&((i=s==null?void 0:s.content)==null?void 0:i.value)}).length>0&&e.jsxs("div",{className:"FacultyPage__info",children:[e.jsx(c,{text:n("faculty.contacts")}),e.jsx(d,{gap:20,wrap:"wrap",className:"FacultyPage__contacts",children:v?e.jsx(k,{}):p.items.filter(s=>{var l,i;return((l=s==null?void 0:s.content)==null?void 0:l.type)&&((i=s==null?void 0:s.content)==null?void 0:i.value)}).map((s,l)=>{const{type:i,value:o}=s.content,h=O(i,o);return e.jsxs(F,{type:"white",children:[e.jsxs("p",{className:"FacultyPage__card-title",children:[i,":"]}),h?e.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:e.jsx(_,{remarkPlugins:[j,f],children:o})}):e.jsx("span",{children:e.jsx(_,{remarkPlugins:[j,f],children:o})})]},i+o+l)})}),e.jsx(d,{justify:"center",align:"center",style:{marginTop:"20px"},children:e.jsx(E,{slotId:5})})]}),(Array.isArray(t==null?void 0:t.outstandingStudents)||(t==null?void 0:t.outstandingStudentsLink)||g&&g.length>0)&&e.jsx("div",{className:"FacultyPage__info",children:$?e.jsx(k,{}):g&&g.length>0?e.jsxs(e.Fragment,{children:[e.jsx(c,{text:n("faculty.outstanding_students")}),e.jsx(d,{gap:20,wrap:"wrap",children:g.map(A)})]}):Array.isArray(t==null?void 0:t.outstandingStudents)&&t.outstandingStudents.length>0?e.jsxs(e.Fragment,{children:[e.jsx(c,{text:n("faculty.outstanding_students")}),e.jsx(d,{gap:20,wrap:"wrap",children:t.outstandingStudents.map(A)})]}):t.outstandingStudentsLink&&e.jsx(G,{link:t.outstandingStudentsLink})})]})};export{oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.