1"use strict";(self.webpackChunkwannado=self.webpackChunkwannado||[]).push([[954],{7954:(e,l,n)=>{n.r(l),n.d(l,{CMSTemplatesScreen:()=>k,default:()=>b});var t=n(6967),a=n(6330),s=n(2791),i=n(4261),r=n(3288),o=n(3626),c=n(9434),d=n(7734),u=n(7610),p=n(912),m=n(7262),h=n(9663),v=n(715),x=n(8886),g=n(6979),j=n(184);const k=()=>{var e,l;const n=null!==(e=null===(l=(0,c.v9)(o.e6).templates)||void 0===l?void 0:l.templates)&&void 0!==e?e:[],[k,b]=(0,s.useState)(!1),[f,C,w]=(0,x.U)({uuid:"",name:""}),[S,T]=(0,s.useState)(n),[Z,E]=(0,s.useState)(""),y=(0,c.v9)(o.b8),F=(0,d.E)();(0,s.useEffect)((()=>{n.length>0&&T(n)}),[n]);const U=S.find((e=>e.uuid===Z)),W=()=>{const e={uuid:(0,i.Z)(),name:"__ Neues Template"};F("templates",{templates:[...S,e]})},M=()=>{F("templates",{templates:S.filter((e=>e.uuid!==Z))}),E(""),b(!1)};return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(r.it,{aboveExplorerSlot:(0,j.jsxs)(t.y,{children:[(0,j.jsxs)(p.g,{children:[(0,j.jsx)(a.Z,{label:"Template erstellen",icon:"plus",rank:2,onClick:W}),""!==Z?(0,j.jsx)(h.F,{label:"",icon:"cog",isActive:k,onChange:e=>{void 0!==U&&(b(e),w(U))}}):null]}),(0,j.jsx)(u.P,{minWidth:"200px",onChange:E,value:Z,readonly:k})]}),pageOrTemplateUuid:Z,globalUuid:"",cmsFrontendMode:"templates",viewportWidth:y,mainSlotReplacement:(()=>{if(k){var e;if(void 0===U)return;return(0,j.jsx)("div",{style:{padding:"20px"},children:(0,j.jsx)(m.W,{label:"Template Einstellungen",children:(0,j.jsxs)(t.y,{children:[(0,j.jsx)(v.Z,{label:"Name",value:null!==(e=f.name)&&void 0!==e?e:"",onChange:e=>C("name",e)}),(0,j.jsxs)(p.g,{children:[(0,j.jsx)(a.Z,{rank:2,icon:"arrow-left",label:"Zur\xfcck",onClick:()=>{b(!1)}}),(0,j.jsx)(a.Z,{rank:1,icon:"save",label:"Speichern",onClick:()=>{(e=>{const l=S.map((l=>l.uuid===Z?e:l));F("templates",{templates:l})})(f),b(!1)}}),(0,j.jsx)(g.$,{confirm:"Soll dieses Template wirklich gel\xf6scht werden?",label:"Template l\xf6schen",rank:3,onClick:M})]})]})})})}})()})})},b=k},7734:(e,l,n)=>{n.d(l,{E:()=>r});var t=n(9434),a=n(5570),s=n(3626),i=n(675);const r=()=>{const e=(0,a.r)("/api/core/cms/settings/write"),l=(0,t.I0)(),n=(0,t.v9)(s.e6);return(t,a,s)=>{const r={...n,[t]:{...n[t],...a}};e({settings:r}).then((()=>{l((0,i.J)()),s&&s()}))}}}}]); 2//# sourceMappingURL=954.98aa405d.chunk.js.map
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.