import{f as u,a4 as d,j as c,a5 as p}from"./index.RuhrnD1v.js";import{c as f}from"./styled-components.CXqQ-NdV.js";const I=d("50%{color:rgba(0,0,0,0);}"),$=u("span",{target:"e1xtngpi0"})(({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:`${I}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),h=({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($,{includeDot:s.length>0,shouldBlink:l,children:e},s.length))};if(g){const e=t?"submit form":"apply";if(a==="multiline"){const l=p()?"⌘":"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(f,{"data-testid":"InputInstructions",className:m,children:s})};export{h as I};
