1import{_ as x}from"./BPHkImpZ.js";import{T as w,O as C}from"#entry";import{u as h}from"./ELRrKRmO.js";import{d as k,x as u,c as v,o as n,w as P,a as t,b as p,u as l,g as M,l as B,i as U}from"./CgQ5EuDd.js";import"./D5qM7pF5.js";import"./B9whEtIf.js";import"./BfKDiHWD.js";import"./BP5eHXk3.js";const D={class:"flex items-center justify-between mb-2"},V={key:0,class:"flex items-center text-xl font-bold"},$={key:1,class:"flex items-center text-xl font-bold"},N={class:"mb-6"},I={"data-testid":"add-page-form",class:"flex flex-col rounded-md gap-4",novalidate:""},O={class:"actions flex flex-col gap-4"},T=k({__name:"UnlinkCategoryModal",setup(j){const{unlinkModalOpen:s,toggleDeleteModal:g,deletePage:m}=h(),{getCategoryId:b,getCategoryName:d,getPageType:i,getPageHasChildren:f}=w(),_=u(()=>{const a=d.value,e=i.value,o=f.value;return e==="content"?o?`Page "${a}" will be deleted. Please note that all its subpages will be deleted as well.`:`Page "${a}" will be deleted.`:e==="item"?o?`"${a}" will be deleted and all assigned products will lose their association. Please note that all its subcategories will be deleted as well.`:`Product Category "${a}" will be deleted and all assigned products will lose their association.`:""}),y=u(()=>b.value),r=()=>{g(!1)};return(a,e)=>{const o=x;return n(),v(o,{modelValue:l(s),"onUpdate:modelValue":e[1]||(e[1]=c=>U(s)?s.value=c:null),"aria-labelledby":"page-modal",tag:"section",role:"dialog",class:"h-full md:w-[500px] md:h-fit m-0 p-0 overflow-y-auto page-modal","overlay-classes":"z-[1000]"},{default:P(()=>[t("header",D,[l(i)==="item"?(n(),p("div",V,"Delete Product Category?")):(n(),p("div",$,"Delete page?")),t("button",{class:"absolute right-2 top-2 px-4 py-4",onClick:r},[M(l(C))])]),t("p",N,B(l(_)),1),t("form",I,[t("div",O,[t("button",{type:"button","aria-label":"deleteButton","data-testid":"delete-btn",class:"bg-red-700 w-full py-2 rounded-md text-white",onClick:e[0]||(e[0]=c=>l(m)(l(y),l(d)))}," Delete page "),t("button",{type:"button","aria-label":"cancelButton","data-testid":"cancel-btn",class:"border border-editor-button w-full py-2 rounded-md text-editor-button",onClick:r}," Keep Page ")])])]),_:1},8,["modelValue"])}}}),F=Object.assign(T,{__name:"UiUnlinkCategoryModal"});export{F 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.