Spirit Airlines Inc. is preparing to file for bankruptcy protection after merger talks with Frontier Group Holdings Inc.