import{Ca as dA,Fn as MV,Gn as NV,Ja as g,Jn as Nhe,Jt as Hx,Ki as _5,L as Bx,Nr as S$,Ns as rh,Rr as Si,S as Ahe,So as jV,V as CI,Wi as _$,X as D$,Xo as lx,Zs as th,ai as Vj,br as Qc,ei as V,et as DI,hi as Wx,hn as Kn,jt as Gj,k as Bb,n as $B,qa as fi,s as $a,ss as o5,yc as wp,za as fA}from"./chunk-b0nJCs5_.js";import{t as X1}from"./chunk-CDRFWLLW.js";import{A as qn,O as ln,s as Jn}from"./chunk-Cmet2Nw-.js";import{O as sr}from"./chunk-DcB590Yc.js";import"./chunk-BvsfL09w.js";import{t as q}from"./chunk-BpR0ReBf.js";var ne=[`modal`];function te(t,n){t&1&&(wp(0,`li`),S$(1,5),Bb())}function oe(t,n){t&1&&(wp(0,`li`),S$(1,6),Bb())}function ie(t,n){t&1&&(wp(0,`li`),S$(1,7),Bb())}function _e(t,n){t&1&&(wp(0,`li`),S$(1,8),Bb())}function ae(t,n){t&1&&(wp(0,`li`),S$(1,9),Bb())}function re(t,n){t&1&&(wp(0,`li`),S$(1,10),Bb())}function le(t,n){t&1&&(wp(0,`li`),S$(1,11),Bb())}function se(t,n){if(t&1){let e=jV();wp(0,`div`,12)(1,`h4`,13),S$(2,1),Bb(),wp(3,`button`,14),rh(`click`,function(){let a=CI(e).close;return DI(a())}),th(4,`my-global-icon`,15),Bb()(),wp(5,`div`,16),th(6,`img`,17),wp(7,`p`),S$(8,2),Bb(),wp(9,`ul`),NV(10,te,2,0,`li`),NV(11,oe,2,0,`li`),NV(12,ie,2,0,`li`),NV(13,_e,2,0,`li`),NV(14,ae,2,0,`li`),NV(15,re,2,0,`li`),NV(16,le,2,0,`li`),Bb(),wp(17,`p`),Hx(18,3),th(19,`strong`)(20,`a`,18),Bx(),Bb()(),wp(21,`div`,19)(22,`my-peertube-checkbox`,20),fA(`ngModelChange`,function(a){CI(e);let g=D$();return o5(g.stopDisplayModal,a)||(g.stopDisplayModal=a),DI(a)}),Bb(),Vj(),wp(23,`input`,21),rh(`click`,function(){let a=CI(e).close;return DI(a())})(`key.enter`,function(){let a=CI(e).close;return DI(a())}),Bb(),wp(24,`a`,22),S$(25,4),Bb()()}if(t&2){let e=D$();$B(10),MV(e.about.instance.name.toLowerCase()===`peertube`?10:-1),$B(),MV(e.isDefaultShortDescription(e.about.instance.shortDescription)?11:-1),$B(),MV(e.about.instance.administrator?-1:12),$B(),MV(e.about.instance.maintenanceLifetime?-1:13),$B(),MV(e.about.instance.businessModel?-1:14),$B(),MV(e.about.instance.moderationInformation?-1:15),$B(),MV(e.about.instance.terms?-1:16),$B(6),dA(`ngModel`,e.stopDisplayModal),Gj()}}var ee=class t{userService=g(Qc);location=g(fi);modalService=g(sr);notifier=g(Si);modal=Nhe(`modal`);created=Ahe();stopDisplayModal=!1;about;LS_KEYS={NO_INSTANCE_CONFIG_WARNING_MODAL:`no_instance_config_warning_modal`};ngOnInit(){this.created.emit()}canBeOpenByUser(n){return!(this.modalService.hasOpenModals()||n.noInstanceConfigWarningModal===!0||Kn.getItem(this.LS_KEYS.NO_INSTANCE_CONFIG_WARNING_MODAL)===`true`)}shouldAutoOpen(n,e){return this.modalService.hasOpenModals()||!n.signup.allowed?!1:n.instance.name.toLowerCase()===`peertube`||!e.instance.terms||!e.instance.administrator||!e.instance.maintenanceLifetime}show(n){if(this.location.path().startsWith(`/admin/settings/config/edit-custom`))return;this.about=n,this.modalService.open(this.modal(),{centered:!0}).result.finally(()=>{this.stopDisplayModal===!0&&this.doNotOpenAgain()})}isDefaultShortDescription(n){return n===`PeerTube, an ActivityPub-federated video streaming platform using P2P directly in your web browser.`}doNotOpenAgain(){Kn.setItem(this.LS_KEYS.NO_INSTANCE_CONFIG_WARNING_MODAL,`true`),this.userService.updateMyProfile({noInstanceConfigWarningModal:!0}).subscribe({next:()=>V.info(`We will not open the instance config warning modal again.`),error:n=>this.notifier.handleError(n)})}static ɵfac=function(e){return new(e||t)};static ɵcmp=$a({type:t,selectors:[[`my-instance-config-warning-modal`]],viewQuery:function(e,l){e&1&&Wx(l.modal,ne,5),e&2&&_$()},outputs:{created:`created`},decls:2,vars:0,consts:()=>{let n;n="關閉此模式";let e;e="不要再對我顯示這些警告";let l;l="關閉";let a;a="設定警告！";let g;g="您在您的站臺上啟用了使用者註冊，但並未設定以下欄位：";let f;f=`請考慮設定這些欄位以協助人們選擇${`�#19�`}適當的站臺${`�/#19�`}。沒有它們，您的站臺可能不會在 ${`�#20�`}JoinPeerTube 網站${`�/#20�`}上被引用。 `;let S;S="設定";let O;O="站臺名稱";let I;I="站臺簡短描述";let T;T="您是誰";let E;E="您計劃維護此站臺多久";let L;L="您打算如何為您的站台持續營運付款";let P;P="您會如何管理您的站臺";let y;return y="站臺條款",[[`modal`,``],a,g,f,S,O,I,T,E,L,P,y,[1,`modal-header`],[1,`modal-title`],[`title`,n,1,`border-0`,`p-0`,3,`click`],[`iconName`,`cross`],[1,`modal-body`],[`src`,`/client/assets/images/mascot/oh.svg`,`alt`,`mascot`,1,`mascot`],[`target`,`_blank`,`rel`,`noopener noreferrer`,`href`,`https://joinpeertube.org`],[1,`modal-footer`,`inputs`],[`inputName`,`stopDisplayModal`,`labelText`,e,3,`ngModelChange`,`ngModel`],[`type`,`button`,`role`,`button`,`value`,l,1,`peertube-button`,`secondary-button`,3,`click`,`key.enter`],[`ngbAutofocus`,``,`href`,`/admin/settings/config/edit-custom`,`target`,`_blank`,`rel`,`noopener noreferrer`,1,`peertube-button-link`,`primary-button`]]},template:function(e,l){e&1&&lx(0,se,26,8,`ng-template`,null,0,_5)},dependencies:[Jn,qn,ln,X1,q],styles:[`li[_ngcontent-%COMP%]{margin-bottom:10px}.mascot[_ngcontent-%COMP%]{display:block;margin:0 auto 50px;width:25%}`],changeDetection:1})};export{ee as InstanceConfigWarningModalComponent};
//# debugId=3ffd24ec-3668-5d36-9d52-61dd466c873f
//# sourceMappingURL=chunk-BPYZcZzM.js.map