(()=>{"use strict";const e=window.React,{ToggleControl:t,Notice:r}=wp.components,{__:a}=wp.i18n,n=window.wp.i18n,o=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M14 10c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm-1-5V3h2v2h2v2h-2v2h-2V7h-2V5h2zM9 6c0-1.6.8-3 2-4h-1c-3.9 0-7 .9-7 2 0 1 2.6 1.8 6 2zm1 9c-3.9 0-7-.9-7-2v3c0 1.1 3.1 2 7 2s7-.9 7-2v-3c0 1.1-3.1 2-7 2zm2.8-4.2c-.9.1-1.9.2-2.8.2-3.9 0-7-.9-7-2v3c0 1.1 3.1 2 7 2s7-.9 7-2v-2c-.9.7-1.9 1-3 1-.4 0-.8-.1-1.2-.2zM10 10h1c-1-.7-1.7-1.8-1.9-3C5.7 6.9 3 6 3 5v3c0 1.1 3.1 2 7 2z"}))),s={type:"save_record",label:(0,n.__)("Save Form Record","jet-form-builder"),edit:function({settings:n,label:o,onChangeSettingObj:s}){const l=window.JetFormEditorData;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{label:o("save_user_data"),checked:n.save_user_data,onChange:e=>s({save_user_data:e})}),(0,e.createElement)(t,{label:o("save_spam"),checked:n.save_spam,onChange:e=>s({save_spam:e})}),!l?.user_journey?.enabled&&(0,e.createElement)(r,{status:"info",isDismissible:!1},(0,e.createElement)("div",null,(0,e.createElement)("p",null,a("You can track User Journey and save it with form submission. To enable this feature, please activate it in global settings.","jet-form-builder")),(0,e.createElement)("a",{href:l.global_settings_url+"#user-journey-tab",target:"_blank",rel:"noopener noreferrer"},a("Go to Settings","jet-form-builder")))),l?.user_journey?.enabled&&(0,e.createElement)(t,{label:o("save_user_journey"),checked:n.save_user_journey,onChange:e=>s({save_user_journey:e})}))},icon:o,docHref:"https://jetformbuilder.com/features/how-to-use-save-form-record-action/"};(0,window.wp.data.dispatch)("jet-forms/actions").registerAction(s)})();