if (!exists("meta") || is.null(meta)) meta <- packageDescription("DeclareDesign")

citHeader(
  "To cite the DeclareDesign software, cite the package itself. To cite the ",
  "design framework it implements, cite Blair, Coppock and Humphreys (2023) ",
  "for the book-length treatment or Blair, Cooper, Coppock and Humphreys ",
  "(2019) for the article. Citing the package and the framework are different ",
  "acts and either may be what you want."
)

bibentry(
  key          = "DeclareDesign",
  bibtype      = "Manual",
  title        = paste0("DeclareDesign: ", meta$Title),
  author       = c(person("Alexander", "Coppock"),
                   person("Graeme", "Blair"),
                   person("Jasper", "Cooper"),
                   person("Macartan", "Humphreys"),
                   person("Neal", "Fultz")),
  year         = "2026",
  note         = paste("R package version", meta$Version),
  url          = "https://declaredesign.org/r/declaredesign/"
)

bibentry(
  key          = "blair_coppock_humphreys_2023",
  bibtype      = "book",
  title        = "Research Design in the Social Sciences: Declaration, Diagnosis, and Redesign",
  author       = c(person("Graeme", "Blair"),
                   person("Alexander", "Coppock"),
                   person("Macartan", "Humphreys")),
  publisher    = "Princeton University Press",
  address      = "Princeton",
  year         = "2023",
  url          = "https://book.declaredesign.org",

  textVersion  =
  paste("Graeme Blair, Alexander Coppock, and Macartan Humphreys (2023).",
        "Research Design in the Social Sciences: Declaration, Diagnosis, and Redesign.",
        "Princeton University Press.",
        "URL https://book.declaredesign.org")
)

bibentry(
  key          = "blair_cooper_coppock_humphreys_2019",
  bibtype      = "article",
  title        = "Declaring and Diagnosing Research Designs",
  author       = c(person("Graeme", "Blair"), person("Jasper", "Cooper"),
                   person("Alexander", "Coppock"), person("Macartan", "Humphreys")),
  journal      = "American Political Science Review",
  volume       = "113",
  issue        = "3",
  pages        = "838-859",
  year         = "2019",
  url          = "https://declaredesign.org/paper.pdf",

  textVersion  =
  paste("Graeme Blair, Jasper Cooper, Alexander Coppock, and Macartan Humphreys (2019).",
        '"Declaring and Diagnosing Research Designs."',
        "American Political Science Review 113(3): 838-859.",
        "URL https://declaredesign.org/paper.pdf")
)
