import u from"./TopBar.8157552e.js";import f from"./Container.f87d9f62.js";import c from"./Content.e22a1fd6.js";import _ from"./Page.3927bdbf.js";import l from"./PageHeader.a5f457a5.js";import d from"./PageHeaderTitle.3ed783af.js";import y from"./PageBody.dec1fae1.js";import v from"./Button.f17dffc9.js";import g from"./List.d5d221b1.js";import h from"./ListItem.ee1e88fb.js";import T from"./StatusBubble.4f1d8322.js";import b from"./NotificationBadge.b6fae3d5.js";import x from"./MainLayout.17290af6.js";import q from"./SettingsLayout.3305573b.js";import C from"./SettingsSegment.e8fdfb41.js";import S from"./FormInput.7debc7c5.js";import k from"./FormFileInput.e5838d58.js";import F from"./FormSelect.6e35ae7d.js";import P from"./Form.2cdcadd9.js";import B from"./FormActions.83ccca91.js";import w from"./FormCustom.efc766cd.js";import{u as n}from"./notification.db2f2ae7.js";import A from"./Tabs.88273262.js";import{n as L}from"./plugin-vue2_normalizer.000ba15c.js";import"./TopBar.27b84f08.js";import"./Dropdown.d1060583.js";import"./DropdownList.02c48c2f.js";import"./DropdownListItem.ac31464c.js";import"./IconMoon.ade3e41b.js";import"./IconSun.8809e5d7.js";import"./IconSearch.27dac870.js";import"./IconButton.eadc8d3d.js";import"./Breadcrumbs.d39e2491.js";import"./BreadcrumbsItem.da3f8155.js";import"./TopBarTabBarContainer.3bdb2bb3.js";import"./TabBar.c1d45ed5.js";import"./TabBarItem.e9886f0a.js";import"./Confirm.888708f1.js";import"./Notification.d432029f.js";import"./IconDanger.2f6e115d.js";import"./IconWarning.ca92fb65.js";import"./IconSuccess.09b85716.js";import"./IconInfo.ad7662f9.js";import"./SearchPalette.282fdde5.js";import"./app.79e1f42d.js";import"./FormGroup.efd02a6a.js";import"./Label.9d0d3ee0.js";import"./ErrorText.b141a597.js";import"./HelperText.14a7ed0b.js";import"./IconClipboard.8551be1b.js";import"./IconKey.455a255f.js";const H={metaInfo(){return{title:`${this.__("Terms")}`}},layout:x,components:{TopBar:u,Container:f,Content:c,Page:_,PageHeader:l,PageHeaderTitle:d,PageBody:y,Button:v,List:g,ListItem:h,StatusBubble:T,NotificationBadge:b,FormInput:S,FormFileInput:k,FormSelect:F,SettingsLayout:q,SettingsSegment:C,Form:P,FormActions:B,Tabs:A,FormCustom:w},data(){return{sending:!1,form:this.$inertia.form({terms:this.terms_settings.terms,terms_required:this.terms_settings.terms_required,privacy:this.terms_settings.privacy})}},props:{terms_settings:Object},methods:{useNotification:n,submit(){this.form.patch(this.route("admin.settings.terms.update"))},getTemplate(a){window.axios.get(this.route("admin.settings.terms.template")).then(t=>{this.form.terms=t.data.content,n({variant:"success",title:this.__("Terms"),message:"Template has been loaded in, do not forget to save."})})}}};var I=function(){var t=this,e=t._self._c;return e("Page",[e("TopBar"),e("Content",[e("Container",[e("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[e("PageHeaderTitle",[t._v(t._s(t.__("Terms")))])]},proxy:!0}])}),e("PageBody",[e("SettingsLayout",{scopedSlots:t._u([{key:"nav",fn:function(){return[e("Tabs")]},proxy:!0},{key:"segments",fn:function(){return[e("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Overview")))]},proxy:!0},{key:"subtitle",fn:function(){return[t._v(" "+t._s(t.__("Enter content for your terms of service and privacy policy here. You may use markdown."))+" ")]},proxy:!0},{key:"form",fn:function(){return[e("form",{staticClass:"space-y-4",on:{submit:function(o){return o.preventDefault(),t.submit.apply(null,arguments)}}},[e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.terms_required,expression:"form.terms_required"}],staticClass:"form-checkbox",attrs:{id:"terms_required",type:"checkbox"},domProps:{checked:Array.isArray(t.form.terms_required)?t._i(t.form.terms_required,null)>-1:t.form.terms_required},on:{change:function(o){var r=t.form.terms_required,i=o.target,p=!!i.checked;if(Array.isArray(r)){var s=null,m=t._i(r,s);i.checked?m<0&&t.$set(t.form,"terms_required",r.concat([s])):m>-1&&t.$set(t.form,"terms_required",r.slice(0,m).concat(r.slice(m+1)))}else t.$set(t.form,"terms_required",p)}}}),e("label",{staticClass:"ml-2 text-sm",attrs:{for:"terms_required"}},[t._v(t._s(t.__("Require users to accept terms of service on registration")))]),e("p",{staticClass:"text-small mt-1 text-medium-emphasis"},[t._v(" "+t._s(t.__("This will require newly registered users to accept the terms of service."))+" ")])]),e("Button",{attrs:{type:"button",size:"sm"},on:{click:function(o){return t.getTemplate("terms")}}},[t._v(" Load Terms of Service template ")]),e("FormCustom",{attrs:{label:"Content Terms Of Service"}}),e("FormCustom",{attrs:{label:"Content Privacy Policy"}}),e("FormActions",[e("Button",[t._v(t._s(t.__("Save")))])],1)],1)]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)},$=[],N=L(H,I,$,!1,null,null,null,null);const It=N.exports;export{It as default};
