import{r as p,j as o,T as e,E as m}from"./index-7d3dbb9c.js";import{L as h}from"./Link-19ee87c9.js";import{D as j}from"./Dialog-d125aee1.js";import{D}from"./DialogTitle-a3176c12.js";import{D as x}from"./DialogContent-d34f4ba4.js";import{D as f}from"./DialogActions-99629c3a.js";const T=({text:s,maxLength:r,readMoreText:l="Read more",dialogTitle:a="Remarks"})=>{const[t,i]=p.useState(!1),c=()=>{i(!0)},n=()=>{i(!1)};if(s.length<=r)return o.jsx(e,{children:s});const d=s.slice(0,r);return o.jsxs(o.Fragment,{children:[o.jsxs(e,{children:[d,s.length>r&&"... ",o.jsx(h,{component:"button",variant:"body2",onClick:c,sx:{cursor:"pointer"},children:l})]}),o.jsxs(j,{open:t,onClose:n,maxWidth:"md",fullWidth:!0,children:[o.jsx(D,{children:a}),o.jsx(x,{children:o.jsx(e,{children:s})}),o.jsx(f,{children:o.jsx(m,{onClick:n,children:"Close"})})]})]})};export{T as R};
