with open("resources/js/components/admin/OrdersManager.tsx", "r", encoding="utf-8") as f:
    content = f.read()

bad_str = """
  const [orderSearch, setOrderSearch] = React.useState('');
  const [orderDateFilter, setOrderDateFilter] = React.useState('all');
  const [orderStartDate, setOrderStartDate] = React.useState('');
  const [orderEndDate, setOrderEndDate] = React.useState('');
"""

content = content.replace(bad_str.strip(), "")

good_str = """
export default function OrdersManager({
  orders, updateOrders, products, canAccess, showToast, deleteItem, getTenantHeaders, getBanglaName
}: OrdersManagerProps) {
  const [orderSearch, setOrderSearch] = React.useState('');
  const [orderDateFilter, setOrderDateFilter] = React.useState('all');
  const [orderStartDate, setOrderStartDate] = React.useState('');
  const [orderEndDate, setOrderEndDate] = React.useState('');
"""
content = content.replace("export default function OrdersManager({\n  orders, updateOrders, products, canAccess, showToast, deleteItem, getTenantHeaders, getBanglaName\n}: OrdersManagerProps) {", good_str.strip())

with open("resources/js/components/admin/OrdersManager.tsx", "w", encoding="utf-8") as f:
    f.write(content)
