Text this: Optimal Partitioning of Quantum Circuits Using Gate Cuts and Wire Cuts