import"./chunk-QTnfLwEv.js";import{n as e}from"./index-7yDgay5u.js";import{i as t,n,o as r,t as i}from"./jsx-runtime-DHSfUA5-.js";import{s as a}from"./test.id-DxQrYxPk.js";import{d as o,o as s,u as c}from"./route-CPr17rXr.js";import{t as l}from"./HeaderLayoutPage-CDZOzzod.js";import{n as u,t as d}from"./FormPage-B0BqbKo9.js";var f=n(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),p=n(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]);r();var m=i();function h(){let n=g(c().state),r=o(),i=n?.mode,h=e=>{r(e===`s3`?`/startup/setup/sync/s3`:`/startup/setup/sync/webdav`,{state:{mode:i,channel:e}})};return _(i)?(0,m.jsx)(l,{rootClassName:t.Page.SurfaceRoot,contentClassName:t.S3SettingsPage.SetupContent,pageTestId:a.page,contentTestId:a.setupContent,header:{tone:`surface`,showBack:!0},children:(0,m.jsx)(d,{title:e(`settings.sync.channel.title`,`Choose storage type`),description:e(`settings.sync.channel.desc`,`Databases and attachments are encrypted before syncing to the selected storage.`),testId:a.channelCard,children:(0,m.jsx)(u,{title:e(`settings.sync.channelLabel`,`Storage type`),items:[{type:`navigation`,icon:(0,m.jsx)(p,{size:26,strokeWidth:1.5}),title:`WebDAV`,description:e(`settings.sync.channel.webdavDesc`,`Sync data through a WebDAV service such as Nextcloud.`),testId:a.channelWebdav,onClick:()=>h(`webdav`)},{type:`navigation`,icon:(0,m.jsx)(f,{size:26,strokeWidth:1.5}),title:`S3`,description:e(`settings.sync.channel.s3Desc`,`Sync data through S3 or S3-compatible object storage.`),testId:a.channelS3,onClick:()=>h(`s3`)}]})})}):(0,m.jsx)(s,{to:`/`,replace:!0})}function g(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e.mode;if(_(t))return{mode:t}}function _(e){return e===`auto`||e===`import`}export{h as StartupSetupSyncPage};
//# sourceMappingURL=sync-DnlmU9ZM.js.map