1import{C as e,r as a,w as t,c as o,_ as s,o as l,f as r,d as p,a2 as u,m as i,a3 as n}from"./Dhu4hwUy.js";import{u as c}from"./MMZqyNmI.js";const d={key:0,class:"popup fancybox-content",id:"get_sale","data-touch":"false"},m={class:"popup__wrap"},v={class:"popup__inner"},y={class:"popup__form"},_={key:0,class:"popup__alert"},f={class:"popup__input"},h={class:"popup__input"},b={__name:"CategoryEditSeoFilters",props:{category:{type:Object,required:!0},user:{type:Object,required:!0}},async setup(b){let g,w;const j=b,O=e().path,S=a([]),{data:k,error:C}=([g,w]=t((()=>c("/api/admin/seo-filters/get-by-url",{method:"POST",headers:{"Content-Type":"application/json"},body:{url:O,code:j.category.code}}))),g=await g,w(),g);k.value.seo_filter&&(S.value=k.value.seo_filter);const T=a({h1:S.value.h1??"",tag:S.value.tag??""}),x=a(!1),E=async()=>{var e;x.value=!1;const a={h1:T.value.h1,tag:T.value.tag,url:O,section_code:j.category.code};try{const{data:t,error:o}=await c("/api/admin/seo-filters/save-by-url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(null==(e=t.value)?void 0:e.success)return x.value=!0,!0;if(o.value){const e=o.value.message||"ÐеизвеÑÑÐ½Ð°Ñ Ð¾Ñибка";throw new Error(`ÐÑибка ÑеÑвеÑа: ${e}`)}}catch(t){throw t}};return(e,a)=>{var t;return b.user&&"Administrator"==(null==(t=b.user)?void 0:t.role)&&b.category.is_filter_page?(l(),o("div",d,[r("div",m,[r("div",v,[a[5]||(a[5]=r("div",{class:"popup__title"},"Ðобавлени SEO-ÑÑÑаниÑÑ ÑилÑÑÑа",-1)),r("div",y,[p(x)?(l(),o("div",_,"СоÑ
Ñанено!")):s("",!0),r("form",{onSubmit:u(E,["prevent"]),class:"add-iblock-element-form"},[r("div",f,[a[2]||(a[2]=r("label",null,"H1",-1)),i(r("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>p(T).h1=e),autocomplete:"off",class:"form-control",type:"text",size:"25",placeholder:"H1"},null,512),[[n,p(T).h1]])]),r("div",h,[a[3]||(a[3]=r("label",null,"Тег",-1)),i(r("input",{"onUpdate:modelValue":a[1]||(a[1]=e=>p(T).tag=e),autocomplete:"off",class:"form-control",type:"text",size:"25",placeholder:"Title"},null,512),[[n,p(T).tag]])]),a[4]||(a[4]=r("div",{class:"popup__submit"},[r("input",{onclick:"yaCounter25505426.reachGoal('sendprice'); return true;",class:"btn--style-c",type:"submit",name:"iblock_submit",style:{border:"none",cursor:"pointer"}})],-1))],32)])])])])):s("",!0)}}};export{b 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.