import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import t,{useState as i,useEffect as n}from"react";import r from"../../node_modules/next/router.js";import{DEFAULT_BLOC_PROPERTIES as o}from"../Bloc/BlocProperties.js";import a from"./Variant/VoiceMedia1.js";import l from"./Variant/VoiceMedia2.js";import{SupportedLanguages as s}from"../Bloc/BlocTypes.js";import{PropsGeneratorForGivenComponent as p}from"../../prop-utils.js";var m,c,u,g=e(e({},o),{variant:"1",title:"Replace this text...",subTitle:"Replace this text...",mediaUrl:"",textColor:"black",headingLumo:"secondary-base",isImageFullHeight:"false",imageSideArrangement:"right",imageOrientation:""});var h=r.withRouter((function(r){var o=r.variant,s=r.title,p=r.subTitle,m=r.content,c=r.links,u=r.mediaUrl,g=r.onVoiceMediaChange,h=i(u),d=h[0],f=h[1];n((function(){}),[d]);var C=function(e){var t=e.properties;g({properties:{variant:o,title:s,subTitle:p,content:t.content,links:c,mediaUrl:u}})},T=function(e){var t=e.properties;g({properties:{variant:o,title:t.text,subTitle:p,content:m,links:c,mediaUrl:u}})},b=function(e){var t=e.properties;g({properties:{variant:o,title:s,subTitle:t.text,content:m,links:c,mediaUrl:u}})},v=function(e){var t=null!=e?e.properties.src:null;f(t),g({properties:{variant:o,title:s,subTitle:p,content:m,links:c,mediaUrl:t}})};switch(o){case"1":return t.createElement(a,e({},r,{onContentChange:C,onTitleChange:T,onSubTitleChange:b,onImageChange:v}));case"2":return t.createElement(l,e({},r,{onContentChange:C,onTitleChange:T,onSubTitleChange:b,onImageChange:v}));default:return t.createElement(a,e({},r,{onContentChange:C,onTitleChange:T,onSubTitleChange:b,onImageChange:v}))}})),d=(u=p({title:(m={},m[s.English]="",m[s.Thai]="",m),subTitle:(c={},c[s.English]="",c[s.Thai]="",c)},["title","subTitle"],[])).propsGenerator,f=u.propsParser;export default h;export{g as DEFAULT_VOICE_MEDIA,d as voiceMediaPropsGenerator,f as voiceMediaPropsParser};
//# sourceMappingURL=VoiceMedia.js.map
