import{_aswe}from"./BasicModal.vue_vue_type_style_index_0_lang-aed8f5e4.js";import{_asye,uasxe}from"./useBaseTable-e7a67916.js";import{_aske}from"./BasicMainCard-33e38576.js";import{_asTe}from"./BasicInput.vue_vue_type_style_index_0_lang-e6a4e582.js";import{_asIe}from"./button.vue_vue_type_style_index_0_lang-f90e25b2.js";import{IasS}from"./Icon-29e38d16.js";import{tasUe}from"./useDataTime-6e234adb.js";import{_asRe,Oasne,Pasie,QasCe,Uasoe,dasBe,iasf,xasSe,oasx,cask,eass,wasd,basn,fasN,RasAe,lash,tasEe,nasA,CasX,Has_,SasLe}from"./index-1ba0f9ec.js";import{gasE}from"./convert-2ad76038.js";import{nasY}from"./textUtils-c37780ad.js";import{gasZ}from"./index-c4537a3b.js";import{MasMe}from"./index-ec322234.js";import{Sas$e}from"./index-4bff02a6.js";import{Casje}from"./index-e22339b6.js";import{IasDe}from"./index-aafc0fe2.js";import{TasF}from"./isSymbol-355a1404.js";import{Uasee}from"./index-f4084f09.js";import"./updateLocale-a8654270.js";import"./index-8f2b7e91.js";import"./_plugin-vue_export-helper-31e07528.js";import"./shallowequal-e0d9eafb.js";import"./vnode-c4e67237.js";import"./useState-dcd360f8.js";import"./useMemo-ee45fb46.js";import"./FormItemContext-33ef1221.js";import"./omit-f5d28cd3.js";import"./lodash-27f814e6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-36a1ea6e.js";import"./index-c8127d4e.js";import"./Badge-8a8eeb58.js";import"./isNumeric-3f69e2aa.js";import"./index-a8579634.js";import"./index-73cafb1e.js";import"./index-e0664925.js";import"./toArray-41940180.js";import"./SearchOutlined-95278fe5.js";import"./pickAttrs-0ddf9a54.js";import"./index-3f6d5caa.js";import"./isMobile-e2e89480.js";import"./index-175b83cf.js";import"./Grid-660f1a55.js";import"./index-f22a4554.js";import"./useRefs-5e33302c.js";import"./_flatRest-7877cdf8.js";import"./index-c136a321.js";import"./Col-f8806a10.js";import"./styleChecker-19ce40ea.js";import"./isPlainObject-e945bc1f.js";import"./usePrice-bc935b83.js";import"./DialogWrap-394d7eb0.js";import"./index-876da578.js";import"./LeftOutlined-93011b30.js";import"./css-aae66f86.js";import"./index-83b891e2.js";import"./index-65e13d19.js";constte=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:o=>o.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"عنوان ویدیو",dataIndex:"video_title",key:"video_title",customRender:o=>o.record.video_title||"-"},{title:"اسلایدر خانه",dataIndex:"show_on_home",key:"show_on_home",align:"center",width:120,customRender:o=>o.record.show_on_home?"بله":"خیر"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:o=>Ue(o.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];asyncfunctionOe(o){constc=awaitne("announcements",o);returnArray.isArray(c)?c:[c]}asyncfunctionae(o,c){constu=awaitie("announcements",o,{...c,updated_at:newDate().toISOString()});returnArray.isArray(u)?u:[u]}asyncfunctionze(o){awaitCe("announcements",o)}asyncfunctionGe(o){const{TableEngineRequest:c}=awaitRe(()=>import("./buildSupabaseQuery-2323f568.js"),["assets/buildSupabaseQuery-2323f568.js","assets/index-1ba0f9ec.js","assets/index-cb402307.css"]),u={...o};!u.sort&&!u.order&&(u.order="-id");constm=awaitc(u,"announcements");try{if(Array.isArray(m==null?void0:m.rows)){constw=u.page||1,O=u.limit||20,z=(w-1)*O,G=m.rows.map((v,H)=>({...v,title:v.title??"",description:v.description??"",video_title:v.video_title??"",thumbnail:v.thumbnail??null,banner:v.banner??null,aparat_embed_code:v.aparat_embed_code??"",show_on_home:v.show_on_home!==!1,index:z+H}));return{...m,rows:G}}}catch(w){console.error("[getAnnouncementsTable]",w)}returnm}constle="home_greeting_subtitle",V="امروز هم یه ماجراجویی تازه داریم!";asyncfunctionHe(o,c){varm,w;constu=awaitoe("configs",{filters:[{field:"key",op:"eq",value:o}],limit:1,page:1});if((w=(m=u.rows)==null?void0:m[0])!=null&&w.id){awaitie("configs"