import{a as j}from"./chunk-H64DET74.mjs";import{a as w}from"./chunk-EZN6KAB6.mjs";import{a as O}from"./chunk-WUFDIQ5Y.mjs";import{b as g}from"./chunk-256IQ3QR.mjs";import{forwardRef as B}from"react";import{SocialTextField as V}from"@baseapp-frontend/design-system/components/web/inputs";import{jsx as s,jsxs as q}from"react/jsx-runtime";function l(e){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(e)}function h(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r)}return o}function u(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?h(Object(o),!0).forEach(function(r){_(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function _(e,t,o){return(t=k(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function k(e){var t=M(e,"string");return l(t)=="symbol"?t:t+""}function M(e,t){if(l(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var z=B(function(e,t){var o=e.placeholder,r=o===void 0?"Message...":o,a=e.autoFocusInput,p=e.SocialTextField,D=p===void 0?V:p,f=e.SocialTextFieldProps,x=f===void 0?{}:f,m=e.SocialUpsertActions,F=m===void 0?O:m,y=e.SubmitActions,T=y===void 0?j:y,d=e.SubmitActionsProps,A=d===void 0?{}:d,b=e.onKeyDown,S=e.formId,v=S===void 0?"text-field-form":S,c=e.submit,R=e.isLoading,P=e.isReply,K=P===void 0?!1:P,I=e.replyTargetName,$=e.onCancelReply,n=e.form,C=function(i,L){i.key==="Enter"&&i.ctrlKey&&(i.preventDefault(),L())},E=function(i){b?b(i,function(){return n.handleSubmit(c)(i)}):C(i,function(){return n.handleSubmit(c)(i)})},U=R||!n.formState.isValid||!n.formState.isDirty;return s(w,{id:v,onSubmit:n.handleSubmit(c),children:q(D,u(u({inputRef:t,name:g.body,control:n.control,onKeyDown:E,placeholder:r,autoFocus:a,isReply:K,replyTargetName:I,onCancelReply:$},x),{},{children:[s(F,{}),s(T,u({formId:v,disabled:U},A))]}))})}),Z=z;export{Z as a};
//# sourceMappingURL=chunk-X2VVDCO6.mjs.map