import{s as u,Z as d,j as c,$ as p,a0 as f}from"./index.Bzd-hLkw.js";const $=d("50%{color:rgba(0,0,0,0);}"),I=u("span",{target:"eh6ncro0"})(({includeDot:o,shouldBlink:n,theme:t})=>({...o?{"&::before":{opacity:1,content:'"•"',animation:"none",color:t.colors.grayTextColor,margin:`0 ${t.spacing.twoXS}`}}:{},...n?{color:t.colors.redTextColor,animationName:`${$}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),b=({dirty:o,value:n,inForm:t,maxLength:r,className:m,type:a="single",allowEnterToSubmit:g=!0})=>{const s=[],i=(e,l=!1)=>{s.push(c(I,{includeDot:s.length>0,shouldBlink:l,children:e},s.length))};if(g){const e=t?"submit form":"apply";if(a==="multiline"){const l=f()?"⌘":"Ctrl";i(`Press ${l}+Enter to ${e}`)}else a==="single"&&i(`Press Enter to ${e}`)}return r&&(a!=="chat"||o)&&i(`${n.length}/${r}`,o&&n.length>=r),c(p,{"data-testid":"InputInstructions",className:m,children:s})};export{b as I};
