module.exports = {
    params: {
        designator: 'C',
        side: 'F',
        from: undefined,
        to: undefined
    },
    body: p => `
        (module C_0805_2012Metric (layer ${p.side}.Cu) (tedit 5F68FEEE)
            ${p.at /* parametric position */}
            (attr smd)

            ${'' /* footprint reference */}
            (fp_text reference "${p.ref}" (at 0 0) (layer ${p.side}.SilkS) ${p.ref_hide} (effects (font (size 1.27 1.27) (thickness 0.15))))
            (fp_text value "" (at 0 0) (layer ${p.side}.SilkS) hide (effects (font (size 1.27 1.27) (thickness 0.15))))

            ${''/* capacitor symbols */}
            (fp_line (start -1 0.625) (end -1 -0.625) (layer ${p.side}.Fab) (width 0.1))
            (fp_line (start -1 -0.625) (end 1 -0.625) (layer ${p.side}.Fab) (width 0.1))
            (fp_line (start 1 -0.625) (end 1 0.625) (layer ${p.side}.Fab) (width 0.1))
            (fp_line (start 1 0.625) (end -1 0.625) (layer ${p.side}.Fab) (width 0.1))
            (fp_line (start -0.261252 -0.735) (end 0.261252 -0.735) (layer ${p.side}.SilkS) (width 0.12))
            (fp_line (start -0.261252 0.735) (end 0.261252 0.735) (layer ${p.side}.SilkS) (width 0.12))
            (fp_line (start -1.7 0.98) (end -1.7 -0.98) (layer ${p.side}.CrtYd) (width 0.05))
            (fp_line (start -1.7 -0.98) (end 1.7 -0.98) (layer ${p.side}.CrtYd) (width 0.05))
            (fp_line (start 1.7 -0.98) (end 1.7 0.98) (layer ${p.side}.CrtYd) (width 0.05))
            (fp_line (start 1.7 0.98) (end -1.7 0.98) (layer ${p.side}.CrtYd) (width 0.05))

            ${''/* SMD pads */}
            (pad 1 smd roundrect (at -0.95 0 ${p.r}) (size 1 1.45) (layers ${p.side}.Cu ${p.side}.Mask ${p.side}.Paste)
                (roundrect_rratio 0.25) ${p.to}
            )
            (pad 2 smd roundrect (at 0.95 0 ${p.r}) (size 1 1.45) (layers ${p.side}.Cu ${p.side}.Mask ${p.side}.Paste)
                (roundrect_rratio 0.25) ${p.from}
            )
        )
    `
}
