import{_aswe}from"./BasicModal.vue_vue_type_style_index_0_lang-f76fec1b.js";import{_asye,uasxe}from"./useBaseTable-45427402.js";import{_aske}from"./BasicMainCard-e8fae2e0.js";import{_asTe}from"./BasicInput.vue_vue_type_style_index_0_lang-644caa39.js";import{_asIe}from"./button.vue_vue_type_style_index_0_lang-e7cef717.js";import{IasA}from"./Icon-b8613529.js";import{tasUe}from"./useDataTime-7db5a46b.js";import{_asRe,Iasne,Jasie,KasCe,Oasoe,dasBe,iasf,xasAe,oasx,cask,eass,wasd,basn,fasN,LasSe,lash,tasLe,nasS,CasY,Has_,MasMe}from"./index-166b4ef1.js";import{gasL}from"./convert-2ad76038.js";import{nasQ}from"./textUtils-c37780ad.js";import{gasZ}from"./index-b9bbd6f2.js";import{MasEe}from"./index-58b86fb2.js";import{Sas$e}from"./index-de862045.js";import{Casje}from"./index-1465c5c8.js";import{IasDe}from"./index-7005b758.js";import{TasF}from"./isSymbol-c953ccc2.js";import{Uasee}from"./index-6c7cbb7d.js";import"./updateLocale-6eb93789.js";import"./index-08810a1f.js";import"./_plugin-vue_export-helper-e5be29c6.js";import"./shallowequal-78a96afc.js";import"./vnode-c85f1a09.js";import"./useState-43a565ec.js";import"./useMemo-99a24173.js";import"./FormItemContext-0e89b3aa.js";import"./omit-55909a9d.js";import"./lodash-593efeb6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-6e462f47.js";import"./index-8bcb6210.js";import"./Badge-a3c7a3a7.js";import"./isNumeric-3f69e2aa.js";import"./index-ad625a72.js";import"./index-011e0893.js";import"./index-3ad11dd3.js";import"./toArray-cf38ce67.js";import"./SearchOutlined-3d6399d7.js";import"./pickAttrs-5cd7ef1f.js";import"./index-7f046693.js";import"./isMobile-e2e89480.js";import"./index-991e4e35.js";import"./Grid-47180f92.js";import"./index-366f722a.js";import"./useRefs-ca4d56b6.js";import"./_flatRest-ae97161b.js";import"./index-b6f0378e.js";import"./Col-6dc2da7a.js";import"./styleChecker-2eddf97d.js";import"./isPlainObject-ed4c9976.js";import"./usePrice-bc935b83.js";import"./DialogWrap-88ddfe3e.js";import"./index-75be736e.js";import"./css-aae66f86.js";import"./index-f98d2511.js";import"./index-dfddf43f.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){constm=awaitne("announcements",o);returnArray.isArray(m)?m:[m]}asyncfunctionae(o,m){constu=awaitie("announcements",o,{...m,updated_at:newDate().toISOString()});returnArray.isArray(u)?u:[u]}asyncfunctionze(o){awaitCe("announcements",o)}asyncfunctionGe(o){const{TableEngineRequest:m}=awaitRe(()=>import("./buildSupabaseQuery-ef077dbd.js"),["assets/buildSupabaseQuery-ef077dbd.js","assets/index-166b4ef1.js","assets/index-0643191e.css"]),u={...o};!u.sort&&!u.order&&(u.order="-id");constc=awaitm(u,"announcements");try{if(Array.isArray(c==null?void0:c.rows)){constw=u.page||1,O=u.limit||20,z=(w-1)*O,G=c.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{...c,rows:G}}}catch(w){console.error("[getAnnouncementsTable]",w)}returnc}constle="home_greeting_subtitle",V="امروز هم یه ماجراجویی تازه داریم!";asyncfunctionHe(o,m){varc,w;constu=awaitoe("configs",{filters:[{field:"key",op:"eq",value:o}],limit:1,page:1});if((w=(c=u.rows)==null?void0:c[0])!=null&&w.id){awaitie("configs",u.rows[0].id,{value:m});return}awa