1import{r as u,j as e,S as _}from"./app-Ha4X7SlF.js";/* empty css */import{A as b}from"./AuthenticatedLayout-BZKUhDrh.js";import p from"./ToggleSwitch-61Ypt1Jm.js";import{I as o}from"./InputError-Do4kQPnM.js";import"./transition-DszwGdUG.js";import"./Sidebar-BmBFQuN7.js";import"./SvgSwitcher-DH9r9e5c.js";import"./ToastNotification-BhTNdAie.js";const g=()=>{const[l,c]=u.useState({custom_Email:"",custom_Confirm_Email:"",custom_font_family:"",custom_font_size:"",custom_font_weight:"",custom_font_style:""}),[a,m]=u.useState({custom_Email:"",custom_Confirm_Email:"",custom_font_family:"",custom_font_size:"",custom_font_weight:"",custom_font_style:""}),n=(t,i)=>{const r={...l,[t]:i};c(r),i&&h(t)},x=()=>{const t={...a},i=Object.keys(l);let r=!0;return i.forEach(d=>{if(!l[d])switch(r=!1,d){case"custom_Email":t[d]="The field Email is required.";break;case"custom_Confirm_Email":t[d]="The field Confirm Email is required.";break;case"custom_font_family":t[d]="The field Font Family is required.";break;case"custom_font_size":t[d]="The field Font Size is required.";break;case"custom_font_weight":t[d]="The field Font Weight is required.";break;case"custom_font_style":t[d]="The field Font Style is required.";break}}),m(t),r},f=()=>{let t=!0;if(l.custom_Email!=l.custom_Confirm_Email){t=!1;const i={...a,custom_Confirm_Email:"Confirm Email does not match with Email."};m(i)}else{const i={...a,custom_Confirm_Email:""};m(i)}return t},h=t=>{const i={...a,[t]:null};m(i)},s=()=>{x()?f()&&console.log("form value : ",l):console.log("Form has errors.")};return e.jsx("div",{className:"p-3 flex",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:"mt-4 sm:p-3 sm:pt-4 p-4",children:[e.jsx("p",{className:"text-base font-bold text-theme",children:"Custom Form"}),e.jsxs("div",{className:"pt-2 flex w-full",children:[e.jsxs("div",{className:"w-1/2",children:[e.jsx("span",{className:"text-sm",children:"Email"}),e.jsx("input",{type:"text",id:"email",name:"email",placeholder:"",className:"w-full px-2 py-1 border border-gray-300 rounded-sm shadow-sm focus:ring-indigo-500 focus:border-indigo-500 placeholder-gray-400 text-xs",value:l.custom_Email,onChange:t=>n("custom_Email",t.target.value)}),e.jsx(o,{message:a.custom_Email,className:"mt-2"})]}),e.jsxs("div",{className:"ml-5 w-1/2",children:[e.jsx("label",{className:"text-sm",children:"Confirm Email"}),e.jsx("input",{type:"text",id:"confirm-email",name:"confirm-email",placeholder:"",className:"w-full px-2 py-1 border border-gray-300 rounded-sm shadow-sm focus:ring-indigo-500 focus:border-indigo-500 placeholder-gray-400 text-xs",value:l.custom_Confirm_Email,onChange:t=>n("custom_Confirm_Email",t.target.value)}),e.jsx(o,{message:a.custom_Confirm_Email,className:"mt-2"})]})]}),e.jsxs("div",{className:"w-full mt-8",children:[e.jsx("p",{className:"text-base font-bold text-theme w-full",children:"Font Styling "}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-family"}),e.jsx("input",{type:"text",placeholder:"Arial",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.custom_font_family,onChange:t=>n("custom_font_family",t.target.value)}),e.jsx(o,{message:a.custom_font_family,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-size"}),e.jsx("input",{type:"text",placeholder:"12px",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.custom_font_size,onChange:t=>n("custom_font_size",t.target.value)}),e.jsx(o,{message:a.custom_font_size,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-weight"}),e.jsx("input",{type:"text",placeholder:"Normal",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.custom_font_weight,onChange:t=>n("custom_font_weight",t.target.value)}),e.jsx(o,{message:a.custom_font_weight,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-style"}),e.jsx("input",{type:"text",placeholder:"italic",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.custom_font_style,onChange:t=>n("custom_font_style",t.target.value)}),e.jsx(o,{message:a.custom_font_style,className:"mt-2"})]})]}),e.jsx("div",{className:"w-full flex justify-end mt-5",children:e.jsx("button",{className:"shadow inline-flex items-center hover:bgThemeDark focus:bgThemeDark focus:shadow-outline text-white py-2 px-3 rounded-md bgTheme text-xs ml-3",onClick:s,children:"Save"})})]})})})},y=()=>{const[l,c]=u.useState({sendinblue_API_key:"",sendinblue_font_family:"",sendinblue_font_size:"",sendinblue_font_weight:"",sendinblue_font_style:""}),[a,m]=u.useState({sendinblue_API_key:"",sendinblue_font_family:"",sendinblue_font_size:"",sendinblue_font_weight:"",sendinblue_font_style:""}),n=(s,t)=>{const i={...l,[s]:t};c(i),t&&h(s)},x=()=>{f()},f=()=>{const s={...a},t=Object.keys(l);let i=!0;return t.forEach(r=>{if(!l[r])switch(i=!1,r){case"sendinblue_API_key":s[r]="The field sendinblue API Key is required.";break;case"sendinblue_font_family":s[r]="The field Font Family is required.";break;case"sendinblue_font_size":s[r]="The field Font Size is required.";break;case"sendinblue_font_weight":s[r]="The field Font Weight is required.";break;case"sendinblue_font_style":s[r]="The field Font Style is required.";break}}),m(s),i},h=s=>{const t={...a,[s]:null};m(t)};return e.jsx("div",{className:"p-3 flex",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:"sm:p-3 sm:pt-4 p-4",children:[e.jsxs("div",{className:"w-full mt-4",children:[e.jsx("p",{className:"text-base font-bold text-theme w-full",children:" Enter Sendinblue API Key"}),e.jsxs("div",{className:"pt-2",children:[e.jsx("input",{type:"text",placeholder:"",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.sendinblue_API_key,onChange:s=>n("sendinblue_API_key",s.target.value)}),e.jsx(o,{message:a.sendinblue_API_key,className:"mt-2"})]})]}),e.jsxs("div",{className:"w-full mt-8",children:[e.jsx("p",{className:"text-base font-bold text-theme w-full",children:"Font Styling of Sendinblue"}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-family"}),e.jsx("input",{type:"text",placeholder:"Arial",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.sendinblue_font_family,onChange:s=>n("sendinblue_font_family",s.target.value)}),e.jsx(o,{message:a.sendinblue_font_family,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-size"}),e.jsx("input",{type:"text",placeholder:"12px",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.sendinblue_font_size,onChange:s=>n("sendinblue_font_size",s.target.value)}),e.jsx(o,{message:a.sendinblue_font_size,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-weight"}),e.jsx("input",{type:"text",placeholder:"Normal",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.sendinblue_font_weight,onChange:s=>n("sendinblue_font_weight",s.target.value)}),e.jsx(o,{message:a.sendinblue_font_weight,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-style"}),e.jsx("input",{type:"text",placeholder:"italic",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.sendinblue_font_style,onChange:s=>n("sendinblue_font_style",s.target.value)}),e.jsx(o,{message:a.sendinblue_font_style,className:"mt-2"})]})]}),e.jsx("div",{className:"w-full flex justify-end mt-5",children:e.jsx("button",{className:"shadow inline-flex items-center hover:bgThemeDark focus:bgThemeDark focus:shadow-outline text-white py-2 px-3 rounded-md bgTheme text-xs ml-3",onClick:x,children:"Save"})})]})})})},j=()=>{const[l,c]=u.useState({mail_chimp_API_key:"",mail_chimp_font_family:"",mail_chimp_font_size:"",mail_chimp_font_weight:"",mail_chimp_font_style:""}),[a,m]=u.useState({mail_chimp_API_key:"",mail_chimp_font_family:"",mail_chimp_font_size:"",mail_chimp_font_weight:"",mail_chimp_font_style:""}),n=(s,t)=>{const i={...l,[s]:t};c(i),t&&h(s)},x=()=>{f()?console.log("form value : ",l):console.log("Error in form.")},f=()=>{const s={...a},t=Object.keys(l);let i=!0;return t.forEach(r=>{if(!l[r])switch(i=!1,r){case"mail_chimp_API_key":s[r]="The field MailChimp API Key is required.";break;case"mail_chimp_font_family":s[r]="The field Font Family is required.";break;case"mail_chimp_font_size":s[r]="The field Font Size is required.";break;case"mail_chimp_font_weight":s[r]="The field Font Weight is required.";break;case"mail_chimp_font_style":s[r]="The field Font Style is required.";break}}),m(s),i},h=s=>{const t={...a,[s]:null};m(t)};return e.jsx("div",{className:"p-3 flex",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:"sm:p-3 sm:pt-4 p-4",children:[e.jsxs("div",{className:"w-full mt-4",children:[e.jsx("p",{className:"text-base font-bold text-theme w-full",children:" Enter Mailchimp API Key"}),e.jsxs("div",{className:"pt-2",children:[e.jsx("input",{type:"text",placeholder:"",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.mail_chimp_API_key,onChange:s=>n("mail_chimp_API_key",s.target.value)}),e.jsx(o,{message:a.mail_chimp_API_key,className:"mt-2"})]})]}),e.jsxs("div",{className:"w-full mt-8",children:[e.jsx("p",{className:"text-base font-bold text-theme w-full",children:"Font Styling of Mailchimp"}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-family"}),e.jsx("input",{type:"text",placeholder:"Arial",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.mail_chimp_font_family,onChange:s=>n("mail_chimp_font_family",s.target.value)}),e.jsx(o,{message:a.mail_chimp_font_family,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-size"}),e.jsx("input",{type:"text",placeholder:"12px",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.mail_chimp_font_size,onChange:s=>n("mail_chimp_font_size",s.target.value)}),e.jsx(o,{message:a.mail_chimp_font_size,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-weight"}),e.jsx("input",{type:"text",placeholder:"Normal",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.mail_chimp_font_weight,onChange:s=>n("mail_chimp_font_weight",s.target.value)}),e.jsx(o,{message:a.mail_chimp_font_weight,className:"mt-2"})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("label",{className:"mr-2 text-gray-700 font-sm w-full block",children:"Font-style"}),e.jsx("input",{type:"text",placeholder:"italic",className:"w-full text-xs rounded-sm border border-gray-300 px-2 py-2",value:l.mail_chimp_font_style,onChange:s=>n("mail_chimp_font_style",s.target.value)}),e.jsx(o,{message:a.mail_chimp_font_style,className:"mt-2"})]})]}),e.jsx("div",{className:"w-full flex justify-end mt-5",children:e.jsx("button",{className:"shadow inline-flex items-center hover:bgThemeDark focus:bgThemeDark focus:shadow-outline text-white py-2 px-3 rounded-md bgTheme text-xs ml-3",onClick:x,children:"Save"})})]})})})};function z({auth:l}){const[c,a]=u.useState(1);return e.jsxs(b,{user:l.user,header:e.jsx("h2",{className:"font-semibold text-xl text-gray-800 leading-tight",children:"New News"}),children:[e.jsx(_,{title:"Create News"}),e.jsx("div",{className:"py-4",children:e.jsxs("div",{className:"max-w-8xl mx-auto px-6 lg:px-8 space-y-5",children:[e.jsxs("div",{className:"flex justify-between py-1 max-[767px]:flex-col",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"News Letter"}),e.jsxs("div",{className:"flex py-3",children:[e.jsx("label",{className:"text-sm font-semibold",children:"Enable News Letter"}),e.jsx("div",{className:"ml-3",children:e.jsx(p,{})})]})]}),e.jsxs("ul",{className:"flex flex-wrap border-b text-sm font-medium text-center text-gray-500 border-gray-200 dark:border-gray-700 dark:text-gray-400 custom-tab",children:[e.jsx("li",{className:"me-2",children:e.jsx("a",{href:"javascript:void(0)","aria-current":"page",onClick:m=>a(1),className:`bg-gray-200 rounded-t border-t border-r border-l inline-block p-2 bg-gray-100 rounded-t-md dark:bg-gray-800 ${c==1?"active dark:text-blue-500 text-blue-600":"text-black"}`,children:"Mailchimp"})}),e.jsx("li",{className:"me-2",children:e.jsx("a",{href:"javascript:void(0)",onClick:m=>
1a(2),className:`bg-gray-200 rounded-t border-t border-r border-l inline-block p-2 bg-gray-100 rounded-t-md dark:bg-gray-800 ${c==2?"active dark:text-blue-500 text-blue-600":"text-black"}`,children:"Sendinblue"})}),e.jsx("li",{className:"me-2",children:e.jsx("a",{href:"javascript:void(0)",onClick:m=>a(3),className:`bg-gray-200 rounded-t border-t border-r border-l inline-block p-2 bg-gray-100 rounded-t-md dark:bg-gray-800 ${c==3?"active dark:text-blue-500 text-blue-600":"text-black"}`,children:"Custom"})})]}),e.jsxs("div",{className:"tabcontent rounded-b-lg border border-radius-b-lg min-h-200 border-t-0 bg-gray-200 mt0 bg-white rounded-lg",children:[c==1&&e.jsx(j,{}),c==2&&e.jsx(y,{}),c==3&&e.jsx(g,{})]})]})})]})}export{z 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.