It's been a while since I've reviewed the functionality of PAMGuard's click detector, but I'll attempt a brief explanation from a cold-start.
Within PAMGuard's click detector is a detection function/"Trigger" that is calculated and updated by applying the click detection algorithm for each new digital sample (as described in the documentation). When the detection function exceeds the threshold PAMGuard creates a new detection. Typically, the start of that click is the sample that exceeds that threshold, and the end of that click is the last sample above that threshold. But the parameters Max click Length, pre sample, and post samples can modify and influence the duration of that detection.
The Max click Length determines the total number of digital samples that PAMGuard will allow to be considered part of a click. If the detection function remains above threshold for more than this number of samples, the click will be truncated to this number. So if Max click Length is 1024 samples, but the detection function is above threshold for 1234 samples, PAMguard will force the duration to be 1024 samples (I suspect it would take the first 1024, but would need to look at the code to confirm).
The pre and post samples come into play when the click detection function remains above threshold for less than the Max click Length. Pre sample of X will shift the start of the click by X sample prior to the first sample that exceeded the detection threshold. Post samples of Y increase the duration of the click Y samples beyond the last sample. This behaviour allows one to ensure that every click will have at least a minimum number of samples (X+Y).
Again, not sure exactly what happens when there is a conflict between pre, post and max samples, guess one would have to check the source code. But guessing from memory, I think the addition of pre and post-samples are subordinate to max click length. That is to say, I think PAMguard will only add samples before and after the click up to the max length.
Hope this additional explanation answers your question.