import{_ as b}from"./AdminLayout.vue_vue_type_script_setup_true_lang-BCOjo3I6.js";import{d as g,c as o,o as a,a as r,b as s,u as c,m as v,h as _,f as n,t,F as m,r as u,j as f,P as h}from"./app-BidmlC59.js";import{_ as k}from"./Pagination.vue_vue_type_script_setup_true_lang-DQBGGaaV.js";import{_ as w}from"./Files.vue_vue_type_script_setup_true_lang-RfZgjaKd.js";import"./simplebar.min-hRaQJumN.js";import"./useToastify-Bhe2cyz3.js";import"./coloris--ejmIHou.js";import"./portal.esm-DCp8ZhOj.js";/* empty css                             *//* empty css              */import"./SearchList.vue_vue_type_script_setup_true_lang-Mz6dy287.js";import"./useCopyToClipboard-CsEpRQpU.js";import"./useRandomNum-BTw6623a.js";const y={class:"container-fluid"},$={class:"form-list product-list list mb-4"},C={class:"card"},j={class:"card-body"},N={class:"form-answer-container"},V={class:"row"},B={class:"col-12 mb-4"},F={class:"title"},P={class:"sub-title"},q={class:"answer"},A=["data-bs-target"],D={key:0,class:"link badge bg-info fs-8 lts-05 mb-3"},E={key:1,class:"mb-2"},L={class:"sub-title lts-05"},S={key:2,class:"mb-2"},T={class:"sub-title lts-05"},z={class:"link badge bg-dark fs-8 lts-05"},G={class:"sub-title lts-05"},H={key:0,class:"d-inline-flex text-success"},I={key:1,class:"d-inline-flex text-danger"},J={class:"mb-2"},K={class:"sub-title lts-05"},M=["id"],O={class:"modal-dialog modal-dialog-centered"},Q={class:"modal-content"},R={style:{direction:"rtl"}},U={class:"modal-header"},W={class:"modal-title lts-05 fs-5"},X={class:"modal-footer"},Y={key:0,class:"product-list-empty d-flex align-items-center justify-content-center",style:{"min-height":"400px"}},Z={class:"lts-05"},us=g({layout:b,__name:"Answers",props:{form:{},answers:{},keyword:{}},setup(x){return(e,d)=>(a(),o(m,null,[r(c(v),{title:e.$t("messages.title.show_form_answers",{form:e.form.title})},null,8,["title"]),s("div",y,[r(w,{title:e.$t("messages.sentence.show_form_answers"),item:e.$t("messages.word.form_creator")},null,8,["title","item"]),s("div",$,[s("div",C,[s("div",j,[s("div",N,[s("div",V,[s("div",B,[s("div",F,[s("span",P,t(e.$t("messages.word.form"))+":",1),n(" "+t(e.form.title),1)])]),(a(!0),o(m,null,u(e.answers.data,l=>(a(),o("div",{key:l.id,class:"col-md-6 col-12 mb-4"},[s("div",q,[s("a",{href:"javascript:void(0)","data-bs-toggle":"modal","data-bs-target":"#remove-form-answer-"+l.id,class:"remove-answer btn btn-xs btn-square btn-light"},d[0]||(d[0]=[s("i",{class:"ri-close-line"},null,-1)]),8,A),l.flag=="unread"?(a(),o("span",D,t(e.$t("messages.word.unread")),1)):_("",!0),l.user_id!=null?(a(),o("p",E,[s("span",L,t(e.$t("messages.word.user"))+": ",1),r(c(h),{href:e.route("admin.users.show",l.user_id),class:"link badge text-info bg-info fs-8 lts-05"},{default:f(()=>[n(t(l.get_user),1)]),_:2},1032,["href"])])):(a(),o("p",S,[s("span",T,t(e.$t("messages.word.user"))+": ",1),s("span",z,t(e.$t("messages.word.guest")),1)])),(a(!0),o(m,null,u(l.get_answer,(i,p)=>(a(),o("p",{key:p,class:"mb-2"},[s("span",G,t(i.title)+": ",1),i.type=="checkbox"?(a(),o(m,{key:0},[i.value!=null&&i.value!=""?(a(),o("span",H,[n(t(e.$t("messages.word.checked"))+" ",1),d[1]||(d[1]=s("i",{class:"ri-check-line"},null,-1))])):(a(),o("span",I,t(e.$t("messages.word.not_checked")),1))],64)):(a(),o(m,{key:1},[n(t(i.value!=null&&i.value!=""?i.value:e.$t("messages.word.empty")),1)],64))]))),128)),s("p",J,[s("span",K,t(e.$t("messages.word.date"))+":",1),n(" "+t(l.jalali_created_at[2]),1)])]),s("div",{class:"modal fade",id:"remove-form-answer-"+l.id,tabindex:"-1","aria-hidden":"true"},[s("div",O,[s("div",Q,[s("form",R,[s("div",U,[s("div",W,t(e.$t("messages.sentence.are_you_sure_delete_form_answer")),1),d[2]||(d[2]=s("button",{type:"button",class:"btn modal-close","data-bs-dismiss":"modal","aria-label":"Close"},[s("i",{class:"ri-close-line"})],-1))]),s("div",X,[r(c(h),{as:"button",href:e.route("admin.forms.answer.destroy",[e.form.slug,l.id]),method:"delete",class:"btn btn-sm btn-danger px-3","data-bs-dismiss":"modal","aria-label":"Close"},{default:f(()=>[n(t(e.$t("messages.word.delete")),1)]),_:2},1032,["href"])])])])])],8,M)]))),128))])]),e.answers.data.length==0?(a(),o("div",Y,[s("div",Z,t(e.$t("messages.sentence.no_items_found")),1)])):_("",!0),r(k,{links:e.answers.links},null,8,["links"])])])])])],64))}});export{us as default};
