Driver side headlamp assembly is corroded, cannot find a replacement. on 2008 Pontiac G6

Middle light within assembly does not work because when buld was replaced before the protective back cover was not put on. Pigtail that contains a black and yellow with is melted and the black wire is completely broken. Need assistance finding a replacement. When searching online they show Head lamp assemblies but I can't tell if the wiring/pigtails are included.

Asked by for the 2008 Pontiac G6