The proportion of the total effect mediated by SP-D was 0.1452 (95% CI: 0.0027 to 0.55, p = 0.05), indicating that approximately 14.52% of the association between smoking and T2DM incidence was explained by SP-D. Here, SFTPD is linked to type 2 diabetes mellitus.