module.exports = {
    params: {
        pos: { type: 'net', value: 'pos' },
        neg: { type: 'net', value: 'neg' },
    },
    body: p => `
        (footprint "Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal"
            ${p.at}
            (descr "JST PH series connector, S2B-PH-K (http://www.jst-mfg.com/product/pdf/eng/ePH.pdf), generated with kicad-footprint-generator")
            (tags "connector JST PH top entry")
            (attr through_hole)
            (fp_text reference "${p.ref}" (at 1 -2.55 ${p.rot}) (layer "F.SilkS") ${p.ref_hide}
                (effects (font (size 1 1) (thickness 0.15)))
            )
            (fp_text value "" (at 1 7.45 ${p.rot}) (layer "F.Fab") hide
                (effects (font (size 1 1) (thickness 0.15)))
            )
            (fp_line (start -2.06 -1.46) (end -2.06 6.36) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -2.06 0.14) (end -1.14 0.14) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -2.06 6.36) (end 4.06 6.36) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -1.3 2.5) (end -1.3 4.1) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -1.3 4.1) (end -0.3 4.1) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -1.14 -1.46) (end -2.06 -1.46) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -1.14 0.14) (end -1.14 -1.46) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -0.86 0.14) (end -1.14 0.14) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -0.86 0.14) (end -0.86 -1.075) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -0.8 4.1) (end -0.8 6.36) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -0.3 2.5) (end -1.3 2.5) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -0.3 4.1) (end -0.3 2.5) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start -0.3 4.1) (end -0.3 6.36) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 0.5 2) (end 1.5 2) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 0.5 6.36) (end 0.5 2) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 1.5 2) (end 1.5 6.36) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 2.3 2.5) (end 3.3 2.5) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 2.3 4.1) (end 2.3 2.5) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 3.14 -1.46) (end 3.14 0.14) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 3.14 0.14) (end 2.86 0.14) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 3.3 2.5) (end 3.3 4.1) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 3.3 4.1) (end 2.3 4.1) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 4.06 -1.46) (end 3.14 -1.46) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 4.06 0.14) (end 3.14 0.14) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))
            (fp_line (start 4.06 6.36) (end 4.06 -1.46) (stroke (width 0.12) (type solid)) (layer "F.SilkS"))

            (fp_line (start -2.06 -1.46) (end -2.06 6.36) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -2.06 0.14) (end -1.14 0.14) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -2.06 6.36) (end 4.06 6.36) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -1.3 2.5) (end -1.3 4.1) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -1.3 4.1) (end -0.3 4.1) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -1.14 -1.46) (end -2.06 -1.46) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -1.14 0.14) (end -1.14 -1.46) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -0.86 0.14) (end -1.14 0.14) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -0.86 0.14) (end -0.86 -1.075) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -0.8 4.1) (end -0.8 6.36) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -0.3 2.5) (end -1.3 2.5) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -0.3 4.1) (end -0.3 2.5) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -0.3 4.1) (end -0.3 6.36) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 0.5 2) (end 1.5 2) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 0.5 6.36) (end 0.5 2) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 1.5 2) (end 1.5 6.36) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 2.3 2.5) (end 3.3 2.5) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 2.3 4.1) (end 2.3 2.5) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 3.14 -1.46) (end 3.14 0.14) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 3.14 0.14) (end 2.86 0.14) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 3.3 2.5) (end 3.3 4.1) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 3.3 4.1) (end 2.3 4.1) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 4.06 -1.46) (end 3.14 -1.46) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 4.06 0.14) (end 3.14 0.14) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start 4.06 6.36) (end 4.06 -1.46) (stroke (width 0.12) (type solid)) (layer "B.SilkS"))
            (fp_line (start -2.45 -1.85) (end -2.45 6.75) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
            (fp_line (start -2.45 6.75) (end 4.45 6.75) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
            (fp_line (start 4.45 -1.85) (end -2.45 -1.85) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
            (fp_line (start 4.45 6.75) (end 4.45 -1.85) (stroke (width 0.05) (type solid)) (layer "B.CrtYd"))
            (fp_line (start -1.95 -1.35) (end -1.95 6.25) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start -1.95 6.25) (end 3.95 6.25) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start -1.25 -1.35) (end -1.95 -1.35) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start -1.25 0.25) (end -1.25 -1.35) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start -0.5 1.375) (end 0.5 1.375) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start 0 0.875) (end -0.5 1.375) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start 0.5 1.375) (end 0 0.875) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start 3.25 -1.35) (end 3.25 0.25) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start 3.25 0.25) (end -1.25 0.25) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start 3.95 -1.35) (end 3.25 -1.35) (stroke (width 0.1) (type solid)) (layer "B.Fab"))
            (fp_line (start 3.95 6.25) (end 3.95 -1.35) (stroke (width 0.1) (type solid)) (layer "B.Fab"))

            (pad "1" thru_hole roundrect (at 0 0 ${p.rot}) (size 1.2 1.75) (drill 0.75) (layers "*.Cu" "*.Mask") (roundrect_rratio 0.208333) ${p.pos.str})
            (pad "2" thru_hole oval (at 2 0 ${p.rot}) (size 1.2 1.75) (drill 0.75) (layers "*.Cu" "*.Mask") ${p.neg.str})
        )
    `
}
