"use strict";(self.webpackChunkdotcms_ui=self.webpackChunkdotcms_ui||[]).push([[2386],{2386:(P,d,n)=>{n.r(d),n.d(d,{DotTemplateNewModule:()=>Z});var v=n(36895),c=n(87904),p=n(42816),e=n(86353);let m=(()=>{class t{constructor(o){this.dotRouterService=o}canLoad(o,a){const[{path:r}]=a;return"designer"===r||"advanced"===r||(this.dotRouterService.gotoPortlet("templates"),!1)}}return t.\u0275fac=function(o){return new(o||t)(e.LFG(p.W))},t.\u0275prov=e.Yz7({token:t,factory:t.\u0275fac}),t})();var f=n(72986),u=n(38131),g=n(74325),h=n(64418),T=n(70047),s=n(24006),C=n(35593),M=n(48778);let D=(()=>{class t{constructor(o,a){this.dotMessageService=o,this.ref=a,this.value="designer",this.map={designer:this.dotMessageService.get("templates.template.selector.design"),advanced:this.dotMessageService.get("templates.template.selector.advanced")}}onClick(){this.ref.close(this.value)}}return t.\u0275fac=function(o){return new(o||t)(e.Y36(u.l),e.Y36(g.E7))},t.\u0275cmp=e.Xpm({type:t,selectors:[["dot-dot-template-selector"]],decls:19,vars:13,consts:[[1,"wrapper"],[1,"options"],["data-testId","designer"],["id","designer","type","radio","value","designer","name","template",3,"ngModel","ngModelChange"],[1,"item"],["size","60","name","web"],["data-testId","advanced"],["id","advanced","type","radio","value","advanced","name","template",3,"ngModel","ngModelChange"],["size","60","name","settings_applications"],["data-testId","description",3,"innerHTML"],["pAutoFocus","","pAutoFocus","","pButton","","data-testId","button",3,"autofocus","label","click"]],template:function(o,a){1&o&&(e.TgZ(0,"div",0)(1,"div",1)(2,"label",2)(3,"input",3),e.NdJ("ngModelChange",function(i){return a.value=i}),e.qZA(),e.TgZ(4,"div",4),e._UZ(5,"dot-icon",5),e.TgZ(6,"span"),e._uU(7),e.ALo(8,"dm"),e.qZA()()(),e.TgZ(9,"label",6)(10,"input",7),e.NdJ("ngModelChange",function(i){return a.value=i}),e.qZA(),e.TgZ(11,"div",4),e._UZ(12,"dot-icon",8),e.TgZ(13,"span"),e._uU(14),e.ALo(15,"dm"),e.qZA()()()(),e._UZ(16,"p",9),e.qZA(),e.TgZ(17,"button",10),e.NdJ("click",function(){return a.onClick()}),e.ALo(18,"dm"),e.qZA()),2&o&&(e.xp6(3),e.Q6J("ngModel",a.value),e.xp6(4),e.Oqu(e.lcZ(8,7,"templates.template.selector.label.designer")),e.xp6(3),e.Q6J("ngModel",a.value),e.xp6(4),e.Oqu(e.lcZ(15,9,"templates.template.selector.label.advanced")),e.xp6(2),e.Q6J("innerHTML",a.map[a.value],e.oJD),e.xp6(1),e.Q6J("autofocus",!0)("label",e.lcZ(18,11,"next")))},dependencies:[h.P,T.L,s.Fj,s._,s.JJ,s.On,C.Hq,M.t],styles:["[_nghost-%COMP%]{display:block;max-width:40rem;text-align:right}.wrapper[_ngcontent-%COMP%]{display:block;max-width:24rem;margin:1rem auto 3rem;text-align:left}.options[_ngcontent-%COMP%]{display:flex;justify-content:space-between}p[_ngcontent-%COMP%]{line-height:1.5;color:#524e5c}.item[_ngcontent-%COMP%]{align-items:center;background-color:#f1f3f4;border:solid 2px #f1f3f4;border-radius:2px;color:#b3b1b8;cursor:pointer;display:flex;flex-direction:column;padding:2rem 2.5rem;transition:border-color .15s ease,color .15s ease}.item[_ngcontent-%COMP%]:hover{color:#7e7a86}.item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1.25rem}input[type=radio][_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;position:absolute}input[type=radio][_ngcontent-%COMP%]:checked + .item[_ngcontent-%COMP%]{border-color:var(--color-main);color:var(--color-main);background-color:rgba(var(--color-sec_rgb),.1)}"]}),t})();const y=[{path:"",component:(()=>{class t{constructor(o,a,r){this.dialogService=o,this.dotMessageService=a,this.dotRouterService=r}ngOnInit(){this.dialogService.open(D,{header:this.dotMessageService.get("templates.select.template.title"),width:"37rem"}).onClose.pipe((0,f.q)(1)).subscribe(a=>{a?this.dotRouterService.gotoPortlet(`/templates/new/${a}`):this.dotRouterService.goToURL("/templates")})}}return t.\u0275fac=function(o){return new(o||t)(e.Y36(g.xA),e.Y36(u.l),e.Y36(p.W))},t.\u0275cmp=e.Xpm({type:t,selectors:[["dot-dot-template-new"]],decls:0,vars:0,template:function(o,a){}}),t})()},{path:":type",loadChildren:()=>Promise.all([n.e(8937),n.e(8592),n.e(7775)]).then(n.bind(n,1547)).then(t=>t.DotTemplateCreateEditModule),canLoad:[m]}];let S=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[c.Bz.forChild(y),c.Bz]}),t})(),Z=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({providers:[m],imports:[v.ez,S]}),t})()}}]);