You should be eligible for pre-trial diversion if its your first offense.
THESE COMMENTS ARE NOT LEGAL ADVICE. They are provided for informational purposes only. Actual legal advice can only be provided after consultation by an attorney licensed in your jurisdiction. Answering this question does not create an attorney-client relationship or otherwise require further consultation.
An attorney would be very helpful in your situation, and a private attorney, rather than a PD, would provide the most benefit. This is because a PD does not really get your case until the filing decision has been made while a private attorney can get to the prosecutor to work out a favorable disposition before the charge is formally filed. That maximizes your chances for diversion or a drop.
Petty theft is not a charge you want on your adult record. It is considered a crime of dishonesty and can cause you problems in employment and housing in the future. Successful diversion would allow you to have the entire incident expunged from your record.
If diversion doesn't happen for whatever reason, ensure you are offered a withhold of adjudication in any pea deal - that allows you to have the record sealed afterwards. Of course, you may have a good case for trial, but that is for your attorney to evaluate and decide. Good luck.