1import b from"./SettingsHeader.fe33f1fc.js";import{J as y}from"./ActionMessage.422613bb.js";import{_ as v}from"./GenericFormError.133a01bb.js";import{h as x,u as f,i as A,c,e as _,w as t,a as s,b as e,F as k,k as D,o as a,j as r,f as S,n as h,t as B,g as o}from"./app.51fed9fe.js";import C from"./SettingsLabel.e1a223e4.js";import{_ as U}from"./TextInput.0f8316e2.js";import{I as R}from"./InputError.f34c4e1d.js";import J from"./SettingsForm.78223ebd.js";import{J as $}from"./Button.e2fe20fb.js";import{J as V}from"./ConfirmationModal.3acca77b.js";import{J as F}from"./DangerButton.9fe2f4dc.js";import{S as L}from"./SecondaryButton.a815eab4.js";import E from"./AllowedRedirectUrlTableEmptyState.9918c594.js";import N from"./SettingsSubLabel.427005c6.js";import"./_commonjsHelpers.2cf1d77b.js";/* empty css */import"./plugin-vue_export-helper.21dcd24c.js";import"./Modal.6fffec74.js";import"./Monitor2Icon.5e0acc43.js";const T=o(" Add Allowed Domain "),j=o(" Add a domain that is allowed as a custom redirect for your newsletter signup forms. "),I=o(" Added. "),M=o(" Add "),z={class:"sm:grid sm:grid-cols-3 sm:gap-4 sm:items-start"},P=o(" URL "),Y=o(' Please keep in mind that there is a differentiation between domains with and without "www" and you can only add host-level domains without any path (e.g. https://example.org). '),q={class:"mt-1 sm:mt-0 sm:col-span-2"},G=e("div",{class:"border-t border-gray-200 mb-10"},null,-1),H=o(" Allowed Domains "),K=o(" These domains are allowed as custom redirects in your newsletter signup forms. "),O={key:1,class:"my-8 flex flex-col"},Q={class:"-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8"},W={class:"inline-block min-w-full py-2 align-middle md:px-6 lg:px-8"},X={class:"overflow-hidden shadow border border-gray-200 md:rounded-lg"},Z={class:"min-w-full"},ee=e("thead",{class:"bg-gray-50"},[e("tr",null,[e("th",{scope:"col",class:"px-6 py-3 text-left text-sm font-medium text-gray-500"}," URL "),e("th",{scope:"col",class:"relative py-3.5 pl-3 pr-4 sm:pr-6"},[e("span",{class:"sr-only"},"Edit"),e("span",{class:"sr-only"},"Delete")])])],-1),te={class:"bg-white"},oe={class:"border-t border-b border-gray-200 bg-brand-100/10"},se={colspan:"4",scope:"colgroup",class:"px-4 py-5 text-left text-sm font-medium text-gray-900 sm:px-6"},le={class:"text-sm text-right"},re={class:"flex justify-end space-x-4 mr-2"},ae=["onClick"],ie=o(" Delete Allowed Domain "),ne=o(" Are you sure you would like to remove this domain?"),de=e("br",null,null,-1),me=o(" You will no longer be able to use custom redirects in your form with this domain. "),ce=o(" Cancel "),ue=o(" Delete "),Ve=x({__name:"AllowedRedirectUrlTable",props:{redirectUrls:null},setup(p){const l=f({url:""}),m=f({url:""}),i=A(null);function g(){l.post(route("allowed-redirect-url.store"),{errorBag:"addAllowedRedirectUrl",preserveScroll:!0,onSuccess:()=>{l.reset()}})}function w(){var u;m.url=(u=i.value)==null?void 0:u.url,m.post(route("allowed-redirect-url.destroy"),{errorBag:"removeAllowedDomain",preserveScroll:!0,preserveState:!0,onSuccess:()=>i.value=null})}return(u,n)=>(a(),c("div",null,[(a(),_(J,{key:0,onSubmitted:g,class:"mb-8"},{title:t(()=>[T]),subtitle:t(()=>[j]),actions:t(()=>[s(y,{on:r(l).recentlySuccessful,class:"mr-3"},{default:t(()=>[I]),_:1},8,["on"]),r(l).hasErrors?(a(),_(v,{key:0})):S("",!0),s($,{class:h({"opacity-25":r(l).processing}),disabled:r(l).processing},{default:t(()=>[M]),_:1},8,["class","disabled"])]),form:t(()=>[e("div",z,[e("div",null,[s(C,{for:"from_name"},{default:t(()=>[P]),_:1}),s(N,null,{default:t(()=>[Y]),_:1})]),e("div",q,[s(U,{id:"url",type:"text",class:"mt-1 block w-full",modelValue:r(l).url,"onUpdate:modelValue":n[0]||(n[0]=d=>r(l).url=d)},null,8,["modelValue"]),s(R,{message:r(l).errors.url,class:"mt-2"},null,8,["message"])])])]),_:1})),G,s(b,{"show-divider":!1},{title:t(()=>[H]),subtitle:t(()=>[K]),_:1}),p.redirectUrls.length>0?(a(),c("div",O,[e("div",Q,[e("div",W,[e("div",X,[e("table",Z,[ee,e("tbody",te,[(a(!0),c(k,null,D(p.redirectUrls,d=>(a(),c("tr",oe,[e("th",se,B(d.url),1),e("th",le,[e("div",re,[e("button",{class:"cursor-pointer text-sm font-medium text-red-500 focus:outline-none",onClick:_e=>i.value=d,"data-test":"confirmRedirectUrlRemovalBtn"}," Delete ",8,ae)])])]))),256))])])])])])])):(a(),_(E,{key:2})),s(V,{show:i.value,onClose:n[2]||(n[2]=d=>i.value=null)},{title:t(()=>[ie]),content:t(()=>[ne,de,me]),footer:t(()=>[s(L,{onClick:n[1]||(n[1]=d=>i.value=null)},{default:t(()=>
1[ce]),_:1}),s(F,{class:h(["ml-2",{"opacity-25":r(m).processing}]),onClick:w,disabled:r(m).processing,"data-test":"deleteAllowedDomainBtn"},{default:t(()=>[ue]),_:1},8,["class","disabled"])]),_:1},8,["show"])]))}});export{Ve as default};
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.