1import{r,j as e}from"./CgBZl8m0.production.bundle.min.js";import{D as m}from"./Czbq-YEj.production.bundle.min.js";import"./CUU-sqeu.production.bundle.min.js";import{C as p,D as h,E as d}from"./IggLV8Lk.production.bundle.min.js";import{c as u}from"./D3x0EDGo.production.bundle.min.js";import"./BTOj8ijf.production.bundle.min.js";import"./BhEpiGZx.production.bundle.min.js";import"./CJLuAe4t.production.bundle.min.js";import"./CHbJgqnE.production.bundle.min.js";import"./Dsqj8S3w.production.bundle.min.js";import"./9zG8c1d8.production.bundle.min.js";import"./C7aKDdDU.production.bundle.min.js";import"./BOFlCg2s.production.bundle.min.js";import"./DvJkqRNe.production.bundle.min.js";import"./vhNSgALD.production.bundle.min.js";import"./BWr4BVpJ.production.bundle.min.js";import"./mPG1iAzk.production.bundle.min.js";import"./D9BowqIy.production.bundle.min.js";import"./M_FBjfQJ.production.bundle.min.js";let c=!0;class g extends r.Component{constructor(a){var o;super(a),this.handleSubmit=l=>{l.preventDefault(),this.validateInputs(),c&&(this.state.editId?this.props.requestUpdateEmailCampaign({editId:this.state.editId,campaign_type:this.state.emailCategory,content_body:this.state.emailContent,subject:this.state.emailtitle},(i,s)=>{console.log("callback-flag---",i),console.log("callback-res---",s),this.props.onSuccess&&typeof this.props.onSuccess=="function"&&this.props.onSuccess()}):this.props.requestEmailDetails({campaign_type:this.state.emailCategory,content_body:this.state.emailContent,subject:this.state.emailtitle},(i,s)=>{console.log("callback-flag---",i),console.log("callback-res---",s),this.props.onSuccess&&typeof this.props.onSuccess=="function"&&this.props.onSuccess()}))},this.validateInputs=()=>{const l=this.state.emailtitle.length<2,i=this.state.emailCategory.length<5,s=this.state.emailContent.length<10;l&&this.setState({EmailTitleErr:!0}),i&&this.setState({EmailCategoryErr:!0}),s&&this.setState({EmailContentErr:!0}),c=!l&&!i&&!s},this.convertContentToHTML=()=>{};const t=((o=this.props)==null?void 0:o.email_campaign)||{};this.handleSubmit=this.handleSubmit.bind(this),this.state={editId:t!=null&&t.id&&t.id>0?t.id:null,emailtitle:(t==null?void 0:t.subject)||"",EmailTitleErr:!1,emailCategory:(t==null?void 0:t.campaign_type)||"",EmailCategoryErr:!1,emailContent:(t==null?void 0:t.content_body)||"",EmailContentErr:!1,_value2:"Select Category",options:[{key:"welcome_email_from_CEO",label:"Welcome to Middleware"},{key:"signup_but_not_logged_in",label:"Signup but not logged in"}
1,{key:"infrastructure_agent_is_not_installed",label:"Infrastructure agent is not installed"},{key:"middleware-roll_out_best_practices_and_planning",label:"Middleware roll out best practices and planning"},{key:"host_agent_installed_but_no_apm",label:"Host agent installed but no APM"},{key:"user_has_installed_agent_but_did_not_create_any_alert",label:"User has installed the agent but did not create any alert"},{key:"account_has_least_one_alert_rule_but_not_integrate_slack",label:"Account has at least one alert rule but did not integrate slack"},{key:"only_one_user_in_the_account",label:"Only one user in the account"}],editorState:"",convertedContent:null}}render(){return e.jsx(r.Fragment,{children:e.jsxs("div",{className:"new-email",children:[e.jsx("h4",{children:this.props.title}),e.jsxs("form",{children:[e.jsxs("div",{className:"title",children:[e.jsx("label",{children:"Subject"}),e.jsx("input",{type:"text",placeholder:"Email Title",className:`${this.state.EmailTitleErr?"is-error":""}`,value:this.state.emailtitle,onChange:a=>{const t=a.target&&a.target.value;this.setState({emailtitle:t})},onKeyUp:a=>{this.state.emailtitle.length>0&&this.setState({EmailTitleErr:!1})}})]}),e.jsxs("div",{className:"title",children:[e.jsx("label",{children:"Select Category"}),e.jsx(m,{placeholder:"Select Category",defaultValue:this.state.emailCategory,options:this.state.options,onChange:a=>{this.setState({emailCategory:a})}})]}),e.jsx("div",{className:"content",children:e.jsx("label",{children:"Email Content"})}),e.jsx("div",{className:"close-bottom",children:e.jsx("button",{onClick:this.handleSubmit,children:"Add Email"})})]})]})})}}const A=u(n=>({emailcontent:p(n)}),{requestEmailDetails:d,requestUpdateEmailCampaign:h})(g);export{A 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.